Null actually means null pointer. Values that contain objects are actually pointers to the object rather than containing the object themself, and null is pointer to nothing. Which is why typeof null is 'object'.
I went through BASIC, C++, Pascal (later Delphi) and finally settled on C# for 2 decades. Once over lunch we were discussing JS with colleagues who used it. I said I hate it. They asked why. Not that they were surprised; they just wanted to hear my version. I said: "I feel like coding in JS compared to C# is like going to a ballroom party in your pyjamas. Not that it can't be done. It just doesn't ever feel right". For the short while I was sentenced to using JS, I remember I spent more than half a day once just chasing a bug due to null checking errors. That's criminal if you ask me. Horrible thing JS. I will not dignify it by calling it a language.
I have a similar language background. C++, Delphi, C#, Java & Kotlin. While I share your sentiment regarding JavaScript I am in love with Typescript. It has the right amount of flexibility for me and I can get things done fast.
Basic, C++ Java, assembly, and C#. C# is by far the best. JS is garbage, basically a squatter language with a whole ecosystem built around it to "fix" it. Yet here I am doing React.ts.
I know PHP, I know Rust, I know SQL, I know Shell-script, I even once knew C and C++, but I have never managed to get comfortable with Javascript. I don't think I ever will. It never ceases to confuse me.
@Terminus265 yeah.. it's not like I can't code in Javascript all. I've been a programmer for well over two decades, so I have had plenty of exposure to it. It's more that Javascript, IMHO, is so inconsistent and has so many nasty surprises that I feel I'm ridiculously unproductive in it.
@@dschledermann Learning to code in JavaScript feels a little like unlearning to program. It has so many quirks and inconsistencies it gives you bad programming habits to get around them
If companies or developers stopped releasing new JavaScript libraries or frameworks every nanosecond, maybe I wouldn't hate it. EDIT: I dont want to use any of them, as the tech layoff wave is spreading, overrule of AI and ridiculous demands from employers, I stop learning new non sense tech just to please my (future)employers or clients so they can pay me less while having a fullstack. I'm now focus in ReactJS/Angular/Nest and hope those skills can buy me 2-3 years more while I'm learning new skills and start over with diff job, away from tech job for good.
meanwhile im 46yo,self taught and still learning JS >HTML>CSS>React with vite for the last one year, im having fun learning JS because i want to be front end dev for my freelance journey
Honestly I kinda love the speed to prototype in JavaScript, even knowing the risk of accruing insane technical debt is a perpetual risk with how quiet the language is about the dev's mistakes. I dunno, I'd rather just take the type coersions in JS than C segmentation faults and Java verbosity.
I was a C# developer for 4 years and then a node/react dev for the next 6 and I can say, most of these are really non-issues... Sure they "exist" but they aren't really issues. No one is trying to add an empty object to the string "0" in production. We have linters that prevent you from using == and most of the time we don't even use the "this" keyword. Module systems are set up once and forgotten about. Also the "chasing shiny frameworks" rhetoric is not something I've seen in reality, I'm not sure why it's being perpetuated so much. These frameworks come out fast but they don't get adopted fast. The fact that JS has given so many devs the ability to create frameworks in the first place should speak to it's it's flexibility. If you're new to programming and want to learn JS, do it. It's a flexible language that can run in many places and is easy to learn. It has issues, but so do all the other languages. Anyone that says otherwise, wants to waste their time arguing rather than getting code shipped.
The main problem with JavaScript is that it handles too many things under the hood. When we learn C, we struggle with pointers and must overcome this to make our programs run. In JavaScript, we don’t need to know how it automatically converts your values behind your back, nor do we need to understand the event loop, or that keeping elements in an array of the same type can make it faster… Our app just works until it doesn’t, and then we’re left bewildered because we missed this kind of information from the beginning.
I decided to take JavaScript seriously because of Dash's clientside callbacks. And I recently got hired into a web development firm that wanted a Python developer just like me. So I decided to learn JavaScript. That undefined vs null causes a little bit of problems. Once I knew the distinction: const, let, var undefined, null object, array, map, set. I also knew JavaScript classes were fake. I was ready.
MySQL has the motto "garbage in, garbage out" , and no one complains about that. You cant add objects, you should expect to get nonsense back in a scripting language that aims to keep running. The real reason devs hate JS is because it doesn't tell them exactly what to do and how to do it. If you keep removing flexibility, you'll end up with a tool that's so terse, it'll make more sense to automate it than let you toy with it.
javascript, html 5 and css 3 are the core of frontend development. The tons of frameworks and libraries that emerge every month make life hell for beginners as you never complete your training because a new react-like framework has just been born. This is absurd. These frameworks appear with the promise of making development more agile, but that is not the case. They only serve to themselves as they move millions of dollars in courses, books and online training. These are their real goals. The question worth commenting on is why employers think that people who don't know these frameworks are incapable of delivering code that actually works and meets the project requirements. In the end, the user needs to have a competent and working frontend at their disposal. My users don't know and don't want to know what react, angular, etc. are.
Matter of preference. Some when they see complications they stop learn that thing. But i think developers should be vast knowledgeable in every tool out there. But who I'm i but people choose what they like
All very good points. I want to add poor coding conventions to the mix as well. I do not like the we need to write code in one event to update code in another.
Pro tip: if your language need the triple equality operator=== that's a huge red flag. Honestly, I consider the vice of casting everything in everything else the worst sin of JavaScript. I prefer much more a statically and strongly typed language like Ada. If you use it correctly, you save yourself a huge amount of stupid bugs (and let's face it: most bugs are due to just stupid errors)
One reason to hate JavaScript less these days, is AI like ChatGPT. Teaching and reminding of language quirks is a pretty good feature. Not that they are always right, but I've found great help when exploring new languages so far.
I hated learning JS and web when forced to work on an internal webapp that was built on bootstrap when Jquery was underpinning it. It made it so confusing and all these frameworks that popup with syntax baggage just made it hell. After that nightmare project I remade their stupid BS template and theme widgets in raw HTML5, CSS, and JS6. Not only did I learn real web dev the website was lean and fast and maintainable by any competent programmer. Those frameworks seem great but the time it appears to save gets paid for later tracing odd bugs or security issues back to your 10 megs of black-box lib imports because FOSS is assumed to be reliable too often.
JS is complicated for beginners or messy developers. You can do things in hundreads of ways and more than half of them are wrong. The hard part of JS is just about learning discipline, cleaness and simplicity. You can do everything with a functional approach without classes and without using this and its contexts. An average developer typically write crap with JS. An advanced one would write very elegant code. Mastering JS is not easy, this is why people hate it. A well written JS code is thousands of time more concise and elegant than a python one.
There is another alternative to JavaScript, beside TypeScript: Dart/Flutter. When compiled/run for the web it is automatically translated to JavaScript. And Dart if a safe and consistent language. Both type-safe, and null-safe. So a lot of bugs are simply prevented by the language itself. Of course, a scricter language requires greater design and programming skills; therefore you need to be a pro.
It's not a good thing that despite all these issues js is used everywhere, but rather a curse. I hope someday python would replace js. Or browsers' get the flexibility to use any language.
Amazing video Mosh, the video was Superb! You are the coolest Professor in the world!!! Iam a beginner, so please suggest on how to start or plan for being a FRONT END DEVELOPER
My first paid project was a telegram bot which I created using NodeJS. So I assigned price as number, but admin entered it with comma. All the posts he created had undefined on price 😂😂
You mean the admin send those "numbers" via http, possibly as query string, which is.... string values? Parsing numbers locally aware is a challenge not just for javascript, but in general. This isn't an issue with javascript.
Typing always gets me. I can assign a variable as a string, then make it a boolean, then finally a date. I know TypeScript fixes this, but you can still sign multiple types to variables in TypeScript. So your variables can be unpredictable when debugging someone else's code.
@@Sebastian-hg3xc not sure you grasp what I'm saying. I personally don't mix types in a single variable, but I've had to debug code from coworkers and other projects where variables were resigned. If that doesn't make sense, I'm not sure how to get through.
@@xenoranger79 Sounds like your company needs some guidance. You seem knowledgable, so why not try and convince them. I do get that you are quite the unpleasant person, so I get why nobody would listen to you.
It's the only language that has a book with this ridiculous title, "Javascript : the good parts". You mean there are bad parts? Yes, there are bad parts. That's why JQuery was invented.
JS isn't perfect (no language is), but people hate on it because they think hating it will in-group them, or for content-creator clout -- contributing to the previous. Coming from JS to Python, there are some nice things about it, but I mostly prefer JS (and TS even more -- it's not that hard to pick up if you know JS). If I'd mostly worked with Python before, though, I suspect I'd have a different opinion. In the future I want to pick up languages like Go and Elixir, and I fully expect to have substantial dislike for parts of the experience.
And this doesn't even touch on it's biggest issues... 1. It is interpreted. You have to worry about performance, run-time errors, error handling in ways you don't in compiled languages, pre-compiling (which may or may not work at work on individual machines), etc. 2. It is typeless meaning runtime errors confusion, TypeScript (which is only a partial solution and still has lots of anys when detailing with the outside world, etc.), etc. 3. It is too tied to DOM, browsers, versions, OS's, etc. in ways you have no control over. 4. It is too tied to HTML/CSS, including all the browser issues, libraries to get around it, rendering, page states, browser versions, security, etc. 5. Too many parts of it are synchronous with all sorts of non-linear behavior for fairly simply communications, I/O, all require massive complexity when you simply want to application the code to simply wait until a call is made and then continue to the next line. 6. It relies on libraries to try to manage the above -- from JQuery, to React, etc. All these add complexity, change far too often, are rarely complete, add additional complexity beyond the language itself and are pretty much necessary for anything with complexity. 7. It's non-local. Things like a file system, local storage, direct access to things, etc. is doesn't typically exist resulting in massively complex work arounds, etc. etc.
if you want to do frontend and backend development then Javascript is a necessity, but you have to learn atleast one more backend language like python,c#,java etc. along with HTML,CSS and a few other frontend frameworks
@@DigitalCanineGames_ "you have to learn atleast one more backend language like python,c#,java etc." Nonsense. You can do full stack javascript with nodejs backends.
@@Sebastian-hg3xc I know you can that's why I said "if you want to do FRONTEND adn BACKEND development JS is a necessity", but just because you can do frontend and backend with JS doesn't mean you should or every company's code base has NodeJs on the backend, so it's good to know more, especially Java and C#
@@DigitalCanineGames_ Why didnt you include helicopter piloting and nursing an elephant kids as required skills then?) Pretty obvious that you can not just blindly put JS everywhere, and pretty obvious that more knowledge is better, so your comment doesnt make a valuable point. Actually it messes the point up, as you DO NOT HAVE to learn anything except JS to be a frontend/backend/fullstack developer in a lots of places. Its good to have various platforms and languages in the background, BUT IT IS NOT REQUIRED, in oppose to what you have said.
using javascript since 1998 for DHTML website, but never use it as primary/main language programming. website is chaotic thing, you'll never can build it only using javascript without HTML and CSS. I don't care full stack or front-end or whatever it called, just used whatever you want to write.
how can anyone moving away from javasript,because browser is only understand the javascript language,accept or not ,if you want to skip javascript ,then you can't develop website as frontend developer,this is the brutal truth of js
Hello Mosh, from beginner level and no basic with any programming languages, so I learn Java to really think and understand how code works, and the flow of code (the goals I want to achieve is build thinking and passionate programming) What do you think?
@@xitaris5981useful in what sense? Lol. Im a software engineer for almost 10 years, i have experienced building various backend services and web applications Who the hell would add empty objects and empty array for what use cases? 😂 Before such empty objects go to your backend to process, should be validated, in real world scenario, no one would ever process empty objects or empty arrays Get your facts straight
@@xitaris5981 "It's extremely useful" Okay, then use the right syntax. If it's arrays, use concat. If it's objects, use Object.assign or the newer spread operator. The plus operator is used for numbers and strings, not for arrays and objects.
I used to like Python more than JavaScript (The 2 interpreted language that I used the most) . There's 2 turning point that made me become like JS more than Python - I hate Python's concept where indentation as a block since I worked with python in many environment - JSDocs
This video is amazingly well put and accurate. I would just have said that the fact it is so popular is because it's the ONLY language that runs in the browser. It's not a matter of choice over other languages, it's literally the only one, for legacy reasons.
@@aaronmark3930 It still relies on JS to glue the code together and WASM still can't manipulate the DOM without doing JS interop So it's still the only language that is supported by browsers natively, you can't juste write a and get going, and it doesn't support all the languages yet, Dart got stable only a few weeks ago But maybe one day ?
@@shaheermansoor-dotcomwell I am a computer engineering student who’s mostly done C, and I would say logic is far easier to learn than syntax. A lot of these front end languages to me at least feel overwhelming with syntax whereas something like C is purely logic based.
I mainly use C# for backend development and learning JavaScript was a breeze after learning C#. I honestly don’t get the hate. Debugging is not horrible if you use console.log along with your browser dev tools
Thanks for this. I'd also add the screwball syntax. Seems like you can't write a function without tossing in some blank pairs of parens and braces. What a mess.
I find this video very funny cause of how true it is, but bruh, I love JavaScript, I do everything with it, typescript is a good one though, since learning typescript, it’s been the go-to, still JavaScript under the hood 😂
Other languages: continuous development. JavaScript: continuous complete rewriting. Don't know any other language which burns so much money for maintenance.
So many non-issues. How is [ ] + { } = ? an issue you could possibly run into??? Why would you want to add an empty array to an empty object? I don't understand a real world application of this. Can someone explain why this video includes it?
Sure, there is no point in using such expressions intentionally. However, if one tries to add values that come from functions that play loose with type conversions, such things can happen and catch a developer unawares.
I saw a lot of memes about JavaScript being trash but I never used it myself. I went straight to TypeScript and honestly I like it. Python and TypeScript are my top languages.
I like Typescript too. Have done C++, Delphi, C#, Java and Kotlin in the past. Typescript has the right amount of type safety and flexibility for me. Also it's nice that I don't have to force everything into a class like in Java for example.
i dont mind js too much, but i prefer typed languages in general, so i prefer typescript. In general though, I prefer compiled languages because I get to worry about how it'll be broken on somebody elses machine and work fine on mine 🤣
I only know C and C++ (they are not the same thing, and learning to write idiomatic C and C++ is like learning a different language, but they do work very similarly under the hood) the idea that null and undefined are two different things ... or that a can equal b and b can equal c but a does not equal c as explained above , yikes ... i dont think i ever wanna learn JS ...
What's up with all the nasty or nonsensical comments? People just being hateful and nasty, with no support of any argument they might have. And the others just post contrarian statements because they just learned about a new language that they'll have to start all over with, lol.
I might be somehow wrong , but I just logged the outputs of these , both in the browser and in a server env , here is what I get : [] + [] => ' ' ; [] + {} => [object Object] ; [] + {} => [object Object] ; {} + {} => [object Object][object Object]
Hey, lets bring jQuery back. It was fun to use and it was easy. Update that to the date. It had all the capabilities the UI could need. Some improvements here and there and it would have been a good alternative to current library set of javascript library jumble.
There's no thumbs-up button :-/ ... not sure what's going on with YT these days. Learning JS right now, agree on all points you make, coming from Java/Python/C# this languages has lot of strange "rules".
sir you better update your course in your website about React native because is it so old version of documentation React Native 0.62 and now React Native 0.72
Null actually means null pointer. Values that contain objects are actually pointers to the object rather than containing the object themself, and null is pointer to nothing. Which is why typeof null is 'object'.
How dare you educate people, they want us to leave them confused and angry.
I went through BASIC, C++, Pascal (later Delphi) and finally settled on C# for 2 decades. Once over lunch we were discussing JS with colleagues who used it. I said I hate it. They asked why. Not that they were surprised; they just wanted to hear my version. I said: "I feel like coding in JS compared to C# is like going to a ballroom party in your pyjamas. Not that it can't be done. It just doesn't ever feel right".
For the short while I was sentenced to using JS, I remember I spent more than half a day once just chasing a bug due to null checking errors. That's criminal if you ask me. Horrible thing JS. I will not dignify it by calling it a language.
You and I have a lot in common. JavaScript is a colossal mistake.
I have a similar language background. C++, Delphi, C#, Java & Kotlin. While I share your sentiment regarding JavaScript I am in love with Typescript. It has the right amount of flexibility for me and I can get things done fast.
Basic, C++ Java, assembly, and C#. C# is by far the best. JS is garbage, basically a squatter language with a whole ecosystem built around it to "fix" it. Yet here I am doing React.ts.
Coming from c# background I hated it at first but cope with it now I prefer svelte over blazor or asp
I know PHP, I know Rust, I know SQL, I know Shell-script, I even once knew C and C++, but I have never managed to get comfortable with Javascript. I don't think I ever will. It never ceases to confuse me.
Similar here. I had to learn c# just so I could avoid js. I hate sql too.
I eventually managed to get it stuck in. I can use JS now. try Mosh's course on modern js.
@Terminus265 yeah.. it's not like I can't code in Javascript all. I've been a programmer for well over two decades, so I have had plenty of exposure to it. It's more that Javascript, IMHO, is so inconsistent and has so many nasty surprises that I feel I'm ridiculously unproductive in it.
@@dschledermann yeah, typescript is much better (tho it's just a linter 😂 that eventually is converted to js)
@@dschledermann Learning to code in JavaScript feels a little like unlearning to program.
It has so many quirks and inconsistencies it gives you bad programming habits to get around them
If companies or developers stopped releasing new JavaScript libraries or frameworks every nanosecond, maybe I wouldn't hate it.
EDIT: I dont want to use any of them, as the tech layoff wave is spreading, overrule of AI and ridiculous demands from employers, I stop learning new non sense tech just to please my (future)employers or clients so they can pay me less while having a fullstack. I'm now focus in ReactJS/Angular/Nest and hope those skills can buy me 2-3 years more while I'm learning new skills and start over with diff job, away from tech job for good.
😅😅
It's kinda your problem if you can't pick one and use it tbh.
Just ignore them. Focus on JavaScript, not the libraries.
Or just creat your own library 😁😜
Don't worry AI will replace these useless languages.
meanwhile im 46yo,self taught and still learning JS >HTML>CSS>React with vite for the last one year, im having fun learning JS because i want to be front end dev for my freelance journey
You too huh
I'm deeply learning html and css right now next it's javascript, I want to be frontend developer
I have an awesome video for you! Coming next week!
@@programmingwithmoshinteresting I am also in same shoes as him
@@programmingwithmosh do you Any plan for flutter?
@@programmingwithmosh آقا مشفق افتخار مایی
same! my latest project requires me to learn all of them, so I hope it won't be a drastic change from the desktop languages
I just started a full stack JS job w/ data analysis job duties too. Seeing this video has made my heart skip a beat.
Honestly I kinda love the speed to prototype in JavaScript, even knowing the risk of accruing insane technical debt is a perpetual risk with how quiet the language is about the dev's mistakes.
I dunno, I'd rather just take the type coersions in JS than C segmentation faults and Java verbosity.
I was a C# developer for 4 years and then a node/react dev for the next 6 and I can say, most of these are really non-issues... Sure they "exist" but they aren't really issues. No one is trying to add an empty object to the string "0" in production. We have linters that prevent you from using == and most of the time we don't even use the "this" keyword. Module systems are set up once and forgotten about. Also the "chasing shiny frameworks" rhetoric is not something I've seen in reality, I'm not sure why it's being perpetuated so much. These frameworks come out fast but they don't get adopted fast. The fact that JS has given so many devs the ability to create frameworks in the first place should speak to it's it's flexibility.
If you're new to programming and want to learn JS, do it. It's a flexible language that can run in many places and is easy to learn. It has issues, but so do all the other languages. Anyone that says otherwise, wants to waste their time arguing rather than getting code shipped.
Finally someone who likes JS...
The main problem with JavaScript is that it handles too many things under the hood. When we learn C, we struggle with pointers and must overcome this to make our programs run. In JavaScript, we don’t need to know how it automatically converts your values behind your back, nor do we need to understand the event loop, or that keeping elements in an array of the same type can make it faster… Our app just works until it doesn’t, and then we’re left bewildered because we missed this kind of information from the beginning.
I decided to take JavaScript seriously because of Dash's clientside callbacks.
And I recently got hired into a web development firm that wanted a Python developer just like me. So I decided to learn JavaScript.
That undefined vs null causes a little bit of problems.
Once I knew the distinction:
const, let, var
undefined, null
object, array, map, set.
I also knew JavaScript classes were fake.
I was ready.
Don't forget about prototypes
And that functions are objects and how to use prototype and what it is.
@@ernestomotta5178Whoops you took it out of my mouth
Okay where does 2:17 come from?? It seems hilarious
The chaos is what makes it beautiful
MySQL has the motto "garbage in, garbage out" , and no one complains about that. You cant add objects, you should expect to get nonsense back in a scripting language that aims to keep running.
The real reason devs hate JS is because it doesn't tell them exactly what to do and how to do it. If you keep removing flexibility, you'll end up with a tool that's so terse, it'll make more sense to automate it than let you toy with it.
Thanks for your amazing content Mosh. You videos are not only very engaging and useful, but also very therapeutic and refreshing 😊
Personally, I hate OOP so classes means fuck all to me. I work as a Senior DevOps Engineer anyway and we use Python (without OOP).
I hate that i can't do anything without creating a promise to keep Javascript from trampling over it and breaking my project.
"There are two types of programing languages ones that people complain about ones that no one use"
--Creator of C++
Good. to see you back.
hello sir, its great to see you again
Is it popular or is it simply the default for front end?
JavaScript is the default for front end web dev.
If you want to be a frontend wizard, you have no choice to master js html css. That is life.
javascript, html 5 and css 3 are the core of frontend development. The tons of frameworks and libraries that emerge every month make life hell for beginners as you never complete your training because a new react-like framework has just been born. This is absurd. These frameworks appear with the promise of making development more agile, but that is not the case. They only serve to themselves as they move millions of dollars in courses, books and online training. These are their real goals. The question worth commenting on is why employers think that people who don't know these frameworks are incapable of delivering code that actually works and meets the project requirements. In the end, the user needs to have a competent and working frontend at their disposal. My users don't know and don't want to know what react, angular, etc. are.
Matter of preference. Some when they see complications they stop learn that thing. But i think developers should be vast knowledgeable in every tool out there. But who I'm i but people choose what they like
Doing great. Here's a dare for you: Make a tutorial video of half an hour in QBasic Language.
All very good points. I want to add poor coding conventions to the mix as well. I do not like the we need to write code in one event to update code in another.
Pro tip: if your language need the triple equality operator=== that's a huge red flag. Honestly, I consider the vice of casting everything in everything else the worst sin of JavaScript.
I prefer much more a statically and strongly typed language like Ada. If you use it correctly, you save yourself a huge amount of stupid bugs (and let's face it: most bugs are due to just stupid errors)
One reason to hate JavaScript less these days, is AI like ChatGPT.
Teaching and reminding of language quirks is a pretty good feature.
Not that they are always right, but I've found great help when exploring new languages so far.
JavaScript is weird, but somehow I love it so much.
I agree. It's a lovely language like C.
same
do you know any different language?
@@paca3107 yes
Stockholm syndrome 😅
I hated learning JS and web when forced to work on an internal webapp that was built on bootstrap when Jquery was underpinning it. It made it so confusing and all these frameworks that popup with syntax baggage just made it hell. After that nightmare project I remade their stupid BS template and theme widgets in raw HTML5, CSS, and JS6. Not only did I learn real web dev the website was lean and fast and maintainable by any competent programmer. Those frameworks seem great but the time it appears to save gets paid for later tracing odd bugs or security issues back to your 10 megs of black-box lib imports because FOSS is assumed to be reliable too often.
JS is complicated for beginners or messy developers. You can do things in hundreads of ways and more than half of them are wrong. The hard part of JS is just about learning discipline, cleaness and simplicity. You can do everything with a functional approach without classes and without using this and its contexts.
An average developer typically write crap with JS. An advanced one would write very elegant code. Mastering JS is not easy, this is why people hate it. A well written JS code is thousands of time more concise and elegant than a python one.
There is another alternative to JavaScript, beside TypeScript: Dart/Flutter. When compiled/run for the web it is automatically translated to JavaScript. And Dart if a safe and consistent language. Both type-safe, and null-safe. So a lot of bugs are simply prevented by the language itself.
Of course, a scricter language requires greater design and programming skills; therefore you need to be a pro.
It's not a good thing that despite all these issues js is used everywhere, but rather a curse.
I hope someday python would replace js. Or browsers' get the flexibility to use any language.
Amazing video Mosh, the video was Superb! You are the coolest Professor in the world!!! Iam a beginner, so please suggest on how to start or plan for being a FRONT END DEVELOPER
Great video Mosh, the video was great! You are the best programming professor in the world!!!
My first paid project was a telegram bot which I created using NodeJS. So I assigned price as number, but admin entered it with comma. All the posts he created had undefined on price 😂😂
🤣🤣🤣
Number(price.replacace(",", ""))
You mean the admin send those "numbers" via http, possibly as query string, which is.... string values? Parsing numbers locally aware is a challenge not just for javascript, but in general. This isn't an issue with javascript.
@@Sebastian-hg3xc The person who paid money(Admin), yes skill issue from my side😁😁. But I fixed it and did some validation using regex.
I love javascript, I have used it for years, almost two decades now. I just don't like to use it on the server.
Typing always gets me. I can assign a variable as a string, then make it a boolean, then finally a date. I know TypeScript fixes this, but you can still sign multiple types to variables in TypeScript. So your variables can be unpredictable when debugging someone else's code.
Well, then don't. What's the problem?
Don't debug other's code? Interesting take.
@@xenoranger79 Dude, I was clearly talking about you taking issue with mixing types of variables. If you dislike that, don't do it.
@@Sebastian-hg3xc not sure you grasp what I'm saying. I personally don't mix types in a single variable, but I've had to debug code from coworkers and other projects where variables were resigned.
If that doesn't make sense, I'm not sure how to get through.
@@xenoranger79 Sounds like your company needs some guidance. You seem knowledgable, so why not try and convince them. I do get that you are quite the unpleasant person, so I get why nobody would listen to you.
It's the only language that has a book with this ridiculous title, "Javascript : the good parts". You mean there are bad parts? Yes, there are bad parts. That's why JQuery was invented.
Hell.. I thought I was a disgruntled engineer unable to establish myself in the industry.. now I learnt why something is not right with this lang
I don't hate JavaScript, but I can't say the same about the ecosystem
JS isn't perfect (no language is), but people hate on it because they think hating it will in-group them, or for content-creator clout -- contributing to the previous. Coming from JS to Python, there are some nice things about it, but I mostly prefer JS (and TS even more -- it's not that hard to pick up if you know JS). If I'd mostly worked with Python before, though, I suspect I'd have a different opinion. In the future I want to pick up languages like Go and Elixir, and I fully expect to have substantial dislike for parts of the experience.
And this doesn't even touch on it's biggest issues...
1. It is interpreted. You have to worry about performance, run-time errors, error handling in ways you don't in compiled languages, pre-compiling (which may or may not work at work on individual machines), etc.
2. It is typeless meaning runtime errors confusion, TypeScript (which is only a partial solution and still has lots of anys when detailing with the outside world, etc.), etc.
3. It is too tied to DOM, browsers, versions, OS's, etc. in ways you have no control over.
4. It is too tied to HTML/CSS, including all the browser issues, libraries to get around it, rendering, page states, browser versions, security, etc.
5. Too many parts of it are synchronous with all sorts of non-linear behavior for fairly simply communications, I/O, all require massive complexity when you simply want to application the code to simply wait until a call is made and then continue to the next line.
6. It relies on libraries to try to manage the above -- from JQuery, to React, etc. All these add complexity, change far too often, are rarely complete, add additional complexity beyond the language itself and are pretty much necessary for anything with complexity.
7. It's non-local. Things like a file system, local storage, direct access to things, etc. is doesn't typically exist resulting in massively complex work arounds, etc.
etc.
Now make a video with how to cope with these shortcomings
Do you think it is worth learning javascript to use it in frontend and backend if not what do you recommend
Unless you're compiling to Web Assembly you need to use JS or something that compiles to JS.
I use TypeScript front and back.
if you want to do frontend and backend development then Javascript is a necessity, but you have to learn atleast one more backend language like python,c#,java etc. along with HTML,CSS and a few other frontend frameworks
@@DigitalCanineGames_ "you have to learn atleast one more backend language like python,c#,java etc."
Nonsense. You can do full stack javascript with nodejs backends.
@@Sebastian-hg3xc I know you can that's why I said "if you want to do FRONTEND adn BACKEND development JS is a necessity", but just because you can do frontend and backend with JS doesn't mean you should or every company's code base has NodeJs on the backend, so it's good to know more, especially Java and C#
@@DigitalCanineGames_ Why didnt you include helicopter piloting and nursing an elephant kids as required skills then?)
Pretty obvious that you can not just blindly put JS everywhere, and pretty obvious that more knowledge is better, so your comment doesnt make a valuable point.
Actually it messes the point up, as you DO NOT HAVE to learn anything except JS to be a frontend/backend/fullstack developer in a lots of places.
Its good to have various platforms and languages in the background, BUT IT IS NOT REQUIRED, in oppose to what you have said.
l am busy with HTML & CSS, and after that going straight JavaScript!!!!
using javascript since 1998 for DHTML website, but never use it as primary/main language programming.
website is chaotic thing, you'll never can build it only using javascript without HTML and CSS.
I don't care full stack or front-end or whatever it called, just used whatever you want to write.
how can anyone moving away from javasript,because browser is only understand the javascript language,accept or not ,if you want to skip javascript ,then you can't develop website as frontend developer,this is the brutal truth of js
Great ❤❤❤
Hello Mosh,
from beginner level and no basic with any programming languages, so I learn Java to really think and understand how code works, and the flow of code (the goals I want to achieve is build thinking and passionate programming)
What do you think?
mosh you are just making it complex, in real world, who the hell would add empty arrays and empty array and objects?
Who wouldn't? It's extremely useful
No one will lol@@xitaris5981
@@xitaris5981useful in what sense? Lol. Im a software engineer for almost 10 years, i have experienced building various backend services and web applications
Who the hell would add empty objects and empty array for what use cases? 😂
Before such empty objects go to your backend to process, should be validated, in real world scenario, no one would ever process empty objects or empty arrays
Get your facts straight
maybe a member in the team who introduce a bug that difficult to trace.
@@xitaris5981 "It's extremely useful"
Okay, then use the right syntax. If it's arrays, use concat. If it's objects, use Object.assign or the newer spread operator. The plus operator is used for numbers and strings, not for arrays and objects.
Can we get a full Sveltekit course please? I'll give you all my money.
I used to like Python more than JavaScript (The 2 interpreted language that I used the most) . There's 2 turning point that made me become like JS more than Python
- I hate Python's concept where indentation as a block since I worked with python in many environment
- JSDocs
This video is amazingly well put and accurate.
I would just have said that the fact it is so popular is because it's the ONLY language that runs in the browser. It's not a matter of choice over other languages, it's literally the only one, for legacy reasons.
Wasm
@@aaronmark3930 It still relies on JS to glue the code together and WASM still can't manipulate the DOM without doing JS interop
So it's still the only language that is supported by browsers natively, you can't juste write a and get going, and it doesn't support all the languages yet, Dart got stable only a few weeks ago
But maybe one day ?
@@Soleryth u r right. but it still is a lang that runs in the browser
Web sites demand more resources than video games these days
How?
@@shaheermansoor-dotcom i can play video games on 1.3ghz CPU but youtube runs good on 4ghz. i underclock my CPU to keep the CPU cool.
@@shaheermansoor-dotcomwell I am a computer engineering student who’s mostly done C, and I would say logic is far easier to learn than syntax. A lot of these front end languages to me at least feel overwhelming with syntax whereas something like C is purely logic based.
@@LiutenantDanHasLegs Nah you just don't know javascript and talk shit ...
@@LiutenantDanHasLegs are you really trying to argue that c is easier to learn/code in than javascript?
After seeing the list of weird stuff it has, it is surprising people call it a “programming language” ))
Java script is cool but oython is lovely i swear i love python
I mainly use C# for backend development and learning JavaScript was a breeze after learning C#. I honestly don’t get the hate. Debugging is not horrible if you use console.log along with your browser dev tools
Thanks for sharing.that is informative
I took a break from learning JavaScript...the frustration
Mr mosh man I love you ❤
Thanks for this. I'd also add the screwball syntax. Seems like you can't write a function without tossing in some blank pairs of parens and braces. What a mess.
Drizzle dropping TS was meant to be a joke at the expense of DHH. They are not really dropping TS
I find this video very funny cause of how true it is, but bruh, I love JavaScript, I do everything with it, typescript is a good one though, since learning typescript, it’s been the go-to, still JavaScript under the hood 😂
Its typescript who stopped me quitting Javascript 😐
Other languages: continuous development. JavaScript: continuous complete rewriting.
Don't know any other language which burns so much money for maintenance.
So many non-issues. How is [ ] + { } = ? an issue you could possibly run into??? Why would you want to add an empty array to an empty object? I don't understand a real world application of this. Can someone explain why this video includes it?
Sure, there is no point in using such expressions intentionally. However, if one tries to add values that come from functions that play loose with type conversions, such things can happen and catch a developer unawares.
@@barbidou If ur functions make your code add an object to an array, they can't be valid functions in real world scenarios.
Guess what, my 1 programming language is JavaScript and still using it with typescript 😮
I'm trying to learn Javascript, I know Java, C++ and rust and omg this language is a clusterfuck is mess that gets away with illegal coding.
I saw a lot of memes about JavaScript being trash but I never used it myself. I went straight to TypeScript and honestly I like it. Python and TypeScript are my top languages.
I like Typescript too. Have done C++, Delphi, C#, Java and Kotlin in the past. Typescript has the right amount of type safety and flexibility for me. Also it's nice that I don't have to force everything into a class like in Java for example.
i dont mind js too much, but i prefer typed languages in general, so i prefer typescript. In general though, I prefer compiled languages because I get to worry about how it'll be broken on somebody elses machine and work fine on mine 🤣
Typescript should be merged into Javascript. The lack of rules in js destroys the language.
Hey mosh, are we expecting new courses from you, I asked you because I love your courses 😊
It's true that JavaScript got some weird behaviours that would sometimes make you scratch your head for hours.
I only know C and C++ (they are not the same thing, and learning to write idiomatic C and C++ is like learning a different language, but they do work very similarly under the hood)
the idea that null and undefined are two different things ... or that a can equal b and b can equal c but a does not equal c as explained above , yikes ... i dont think i ever wanna learn JS ...
i hate it and it doesn't pay my bills yet :(
i know a lot about python and i can say JS is really bad, and i built a few stuff in JS
Same.lol!
As a fresher can I start learning a Javascript?
Also tools like Babel and Typescript wreak havoc on your debugging experience.
I just started learning js this month
Javascript is that sticky goop that makes webpages slow. Youmostly think about it when it's doing something bad.
`this` is a menace
I love JavaScript❤
What's up with all the nasty or nonsensical comments? People just being hateful and nasty, with no support of any argument they might have. And the others just post contrarian statements because they just learned about a new language that they'll have to start all over with, lol.
What is your upcoming course mosh
Flutter
Hey Mosh could you do a caching course, like redis
I might be somehow wrong , but I just logged the outputs of these , both in the browser and in a server env , here is what I get : [] + [] => ' ' ; [] + {} => [object Object] ; [] + {} => [object Object] ; {} + {} => [object Object][object Object]
Yes, mosh is wrong on this one.
PHP has suffered hate for decades and survived, its JavaScript turn! Like JavaScript they both put food on the table.
Hey, lets bring jQuery back. It was fun to use and it was easy. Update that to the date. It had all the capabilities the UI could need. Some improvements here and there and it would have been a good alternative to current library set of javascript library jumble.
I find TS helpful. Especially libraries built with ts.
I hate JavaScript but love Typescript.
That's why typescript makes Javascript better.
JavaScript is not clear about a lot of stuff but I love it.
Typescript is a Language ❌
Typescript is a Linter ✔
These are what make Javascript the best programming language.
That's why I love it! hahah
jQuery literally ruined my first few years of my career. I completely had no clue what JavaScript was.
There's no thumbs-up button :-/ ... not sure what's going on with YT these days. Learning JS right now, agree on all points you make, coming from Java/Python/C# this languages has lot of strange "rules".
Drizzle didn't remove TypeScript. Drizzle team was dunking on DHH for his decision to remove TypeScript. It was a joke on Twitter.
sir you better update your course in your website about React native because is it so old version of documentation React Native 0.62 and now React Native 0.72
I'm not scared of ghost only scared of Javascript
Where is @2:16 from?😂