I find the linked post about two new features in Node.js 14[0] much more interesting:<p>> Optional Chaining operator (?.)<p>> Nullish Coalescing operator (??)<p>Esp chaining can have a huge impact on readability.<p>[0]: <a href="https://www.monkwhocode.com/2020/05/nodejs-v14-2-things-to-know.html" rel="nofollow">https://www.monkwhocode.com/2020/05/nodejs-v14-2-things-to-k...</a>
A few more items added to the kitchen sink that is JavaScript.<p>JavaScript's multi-paradigm approach is one of its strengths, but, in my opinion, a weakness at the same time.<p>It allows people to write JavaScript following whatever approach suits them, which is fine for individual developers and small teams, but expand beyond that and it becomes a big ask for every developer to be up to speed with every feature JavaScript supports.<p>I use and teach JavaScript/TypeScript every day, and its possible to be very productive with it, but I prefer the approaches of Go and Clojure better. Limited languages that support a single paradigm, and support it well.
As a minor note—the exponentiation operator was added in ES2016 / ES7, not ES2015 / ES6. It wouldn’t matter, except you need to tell all your tools (Terser, etc.) that you are using ES2016 or they will throw syntax errors when processing your code.
tldr: If you don't want to scroll down the massive header and repeated statement of the title:<p>1. Double asterisk is the exponentiation operator.<p>2. _ can be used in numbers, e.g. 1_000_000<p>Also (and not in the article) both are also true in Python.
I was expecting this to be about object literal setters (and getters):<p><pre><code> const language = {
set current(name) {
this.log.push(name);
},
log: []
};
</code></pre>
Supported by browsers for fifteen years now.