The web is drowning in outdated JavaScript advice. You probably already knew this. I certainly did. But I didn’t really grasp the size of the problem until I started to dig into some old code.

Recently, I’ve been helping to update an old (but classic) JavaScript book from tech publisher O’Reilly. On the way, I’ve been researching corners of JavaScript that I haven’t touched in a while. And I’ve come across plenty of awful advice.

The problem isn’t clickbait. (It’s pretty easy to spot when a writer is more interested in getting you to scroll past a few ads than to share some genuine insight.) The problem is old content that no longer represents best practices. And the search ranking of this content is often surprisingly high. If you aren’t specifically looking for a hot new feature that was introduced with one of the last few ECMAScript releases, the sheer weight of old information often overwhelms newer and more relevant content.

To be clear, I’m not talking about relatively minor points (like you should use let instead of var to prevent weird edge cases with variable hoisting). These are relevant issues, but not critical. I’m talking about major patterns that have shifted over the past decade. Things like associative arrays or modules. For example, it’s easier to find articles touting the basically obsolete revealing module pattern than to learn about one of the modern approaches, like Node or the official ES6 module standard. And the problem is made worse by the way new developers often write new blog entries to rehash old advice (a practice encouraged by coding camps). I came across old, roll-your-own module system advice from articles like this written as recently as 2019(!)

It’s the-emperor-has-no-clothes level bad.

There’s no obvious fix for old information about a quickly evolving language with a long and dirty history. Which got me thinking about something I could do — share my personal go-to resources. These are the websites I use to research the JavaScript features I don’t know as well, or to check up and see if anything’s changed with the features I do know. So far, none of these resources has let me down with old techniques or recycled advice.

The Mozilla Developer Network

Most developers are familiar with the reference portion of the MDN, where you can find complete catalogs of CSS properties and DOM objects. But the MDN also has a sprawling catalog of extremely useful material explaining new JavaScript features.

#es2020 #web-development #programming #ecmascript #javascript

The Websites I Use to Learn Modern JavaScript
1.05 GEEK