ES2021 is going to land soon 🚀
It's gonna be really exciting.

Meanwhile - are you fully up to speed with all the cool things we got from ES2020?

Let's take a look at a few of them here 🧵 👇

⚡ Dynamic import

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.
⚡ Optional Chaining

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.
⚡ Nullish Coalescing

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.
⚡ globalThis

If you want to reuse 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.
⚡ Promise.allSettled

With this new member of Promise, we can accept an array of Promises and only resolve when all of them are settled. Either resolved or rejected.

This enables us to run all promises without caring if they're resolved or rejected.

More from All

1. Mini Thread on Conflicts of Interest involving the authors of the Nature Toilet Paper:
https://t.co/VUYbsKGncx
Kristian G. Andersen
Andrew Rambaut
Ian Lipkin
Edward C. Holmes
Robert F. Garry

2. Thanks to @newboxer007 for forwarding the link to the research by an Australian in Taiwan (not on

3. K.Andersen didn't mention "competing interests"
Only Garry listed Zalgen Labs, which we will look at later.
In acknowledgements, Michael Farzan, Wellcome Trust, NIH, ERC & ARC are mentioned.
Author affiliations listed as usual.
Note the 328 Citations!
https://t.co/nmOeohM89Q


4. Kristian Andersen (1)
Andersen worked with USAMRIID & Fort Detrick scientists on research, with Robert Garry, Jens Kuhn & Sina Bavari among


5. Kristian Andersen (2)
Works at Scripps Research Institute, which WAS in serious financial trouble, haemorrhaging 20 million $ a year.
But just when the first virus cases were emerging, they received great news.
They issued a press release dated November 27, 2019:

You May Also Like