9 Reasons People Hate JavaScript

Published 2024-05-17
Why does everyone HATE JavaScript? We expose its flaws, quirks, and why it's still the king of the web!

✋ Stay connected

- Twitter: twitter.com/moshhamedani
- Facebook: www.facebook.com/programmingwithmosh/
- Instagram: www.instagram.com/codewithmosh.official/
- LinkedIn: www.linkedin.com/school/codewithmosh/

📖 What's covered

00:00 - Introducing JavaScript
00:14 - History of JavaScript
00:32 - Coercion
00:59 - Equality operators
01:29 - Array.sort
01:50 - Null and undefined
02:08 - The this keyword
02:23 - Classes
02:38 - Module system
03:16 - TypeScript
03:47 - Ecosystem
04:28 - Why JavaScript is the king

#javascript #programming #webdevelopment #coding

All Comments (21)
  • @lucaspham5238
    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.
  • @dschledermann
    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.
  • 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 hate that i can't do anything without creating a promise to keep Javascript from trampling over it and breaking my project.
  • @dni_
    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
  • @user-ly3on4jg7g
    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.
  • @dormiebasne3578
    JavaScript is the chaotic language something like the internet deserves to represent it.
  • @jpallatin
    JavaScript is weird, but somehow I love it so much.
  • @TrusePkay
    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.
  • @umerbedewi477
    I'm deeply learning html and css right now next it's javascript, I want to be frontend developer
  • @Soleryth
    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.
  • @moredortor
    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.
  • @AnnCatsanndra
    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.
  • @JW-pu1uk
    I just started a full stack JS job w/ data analysis job duties too. Seeing this video has made my heart skip a beat.
  • @riccardob9026
    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)
  • @KamramBehzad
    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.
  • @tendamolesta
    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.
  • @MARC1TIM
    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.
  • @johnpeters9777
    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.