re: What are your biggest struggles in learning JavaScript? VIEW POST


When first starting out as more of a hobbyist one of the first things I struggled with was how best to use objects and the object structure to store and use data. When to use OLOO vs. a class-like structure to properly scope functions, when to use prototypes, etc. Much of this has been "figured out" or at least made easier in the latest versions of ECMA which is nice.

Working with promises / async and chaining multiple things together to ensure state came together properly (in the jQuery days) and you didn't get "undefined" for your variable that logged just fine in the console was the next annoyance. Abstractions for these are pretty high quality now and somewhat easier to use but I definitely recommend gaining understanding before using otherwise it will bite you eventually :)

this (as has been said) is also an issue for me. Can still bite but at least I know to think "hey which this is this?" now.

Testing. Testing is super important but all the frameworks out there do it slightly differently and figuring out how to mock async / nested / imported stuff from scratch can be super hairy and difficult. I would still kill for an awesome tutorial on JavaScript testing practices. I wish I had started my testing discipline earlier so I had better muscle memory here.

code of conduct - report abuse