ES2020 is here!
The fresh new and improved specification of JavaScript
Let me take you through some of the cool new things that we get!
These are my 5 favorite new features
The fresh new and improved specification of JavaScript

Let me take you through some of the cool new things that we get!
These are my 5 favorite new features

With this new feature, we can import JavaScript modules dynamically, as we need it.
This pattern is also known as code-splitting, and with ES2020 we can do this natively instead of relying on tools like Webpack.

With this feature, we can now access deeply nested properties without having to null-check.
Notice how 'quxBaz' becomes undefined instead of throwing a reference error.

With Nullish Coalescing, we can now evaluate values that are 'nullish', not just 'falsy'.
Notice how the variable 'foo' is falsy, but not nullish (null or undefined).
In some cases, we want to use fallbacks only in the case of null or undefined.

If you want to reuse the same code across different runtimes, you'll run into trouble with the global object.
globalThis will reference 'window' in browsers, 'global' in Node.js, and 'self' in Web Workers.
Now we don't have to manually detect the runtime anymore.