Hacker News new | ask | show | jobs
by qwerty456127 1202 days ago
Is there a complete list of proper modern JavaScript features and examples covering all and only the features and styles which are modern (not neccesarily this new, perhaps some are 4-year-old) and relevantant + those which have never been replaced by any newer so are sill relevant although old but excluding outdated features and styles?
5 comments

straight legs jeans instead of bell-bottom jeans because less fabric required. Hats have been replaced by caps, or just go without either, because we are mostly inside anyway. We still use suits, but it's not required. Most people use jeans, because SWE's can't afford wool.

Ohh, sorry, you mean JavaScript... const is the new var because Java programmers don't understand function scope. ()=>{} is the new function declaration because many people want to go back to Perl like syntax. class instead of prototype because Java programmers don't understand prototype. TypeScript instead of JavaScript because Java programmers can't live without type annotations and editor autocomplete. async/await instead of Promise because what we can't see (async code) can't hurt us. import instead of require because JetBean intellicense could not autocomplete dynamic require/imports.

I don't know why this got downvoted but this is a great comment.
Can you make an example of features/styles that have been replaced? I'm not really sure what you mean by that.
The classic example is .then .catch callbacks vs async await, though .then is still occasionally useful.
As an example, the immediately invoked function expression (IIFE) has been superseded by ES 6 modules.
Others have provided great examples of what I meant.
I want this for TypeScript, but also for C#, and C++, who have all been modernizing quite quickly.
I’m not sure if this matches what you want, but I made a note of this site when I ran across it for a similar reason:

https://javascript.info/

I haven't found one yet, but I'm sure there's one somewhere out there. I will try to keep updating this article so someday it will be what you're looking for.