Plastic surgeons explain the changes to Khloe Kardashian’s nose, chin, and cheeks

tv live
4 min readNov 21, 2020

Photo by Shahadat Rahman on Unsplash.

Thanks to Babel, I’ve been using the new ECMAScript 2021 features for over a year. Almost all the features are useful, but three of them stood out from the pack by saving me a lot of time and making my code more readable.

Let’s go over them.

1. Logical Assignment Operator

http://www.chocholowskietermy.pl/modkha/ba-v-we1.html
http://www.chocholowskietermy.pl/modkha/ba-v-we2.html
http://www.chocholowskietermy.pl/modkha/ba-v-we3.html
http://www.chocholowskietermy.pl/modkha/ba-v-we4.html
http://www.chocholowskietermy.pl/modkha/ba-v-we5.html
http://www.chocholowskietermy.pl/modkha/ba-v-we6.html
http://www.chocholowskietermy.pl/modkha/ba-v-we7.html
http://www.chocholowskietermy.pl/modkha/ba-v-we8.html
http://www.chocholowskietermy.pl/modkha/ba-v-we9.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we1.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we2.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we3.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we4.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we5.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we6.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we7.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we8.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/ba-v-we9.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/Eng-v-Ie-liv01.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/Eng-v-Ie-liv02.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/Eng-v-Ie-liv03.html
https://manchestercommunitycentral.org/sites/manchestercommunitycentral.co.uk/files/webform/Eng-v-Ie-liv04.html
https://donateyourgas.period.org/nfx/Eng-v-Ie-liv01.html
https://donateyourgas.period.org/nfx/Eng-v-Ie-liv02.html
https://donateyourgas.period.org/nfx/Eng-v-Ie-liv03.html
https://donateyourgas.period.org/nfx/Eng-v-Ie-liv04.html
http://www.chocholowskietermy.pl/kmp/Eng-v-Ie-liv01.html
http://www.chocholowskietermy.pl/kmp/Eng-v-Ie-liv02.html
http://www.chocholowskietermy.pl/kmp/Eng-v-Ie-liv03.html
http://www.chocholowskietermy.pl/kmp/Eng-v-Ie-liv04.html

The logical assignment operator combines logical operations (like ??, &&, or ||) with an assignment (e.g. =).

Here are some examples.

a ||= b returns a if a is truthy or b if a is falsy.

a &&= b returns b if a is truthy or a if a is falsy.

a ??= b returns b if a is null or undefined, or it returns a if a is truthy.

At first, it was slightly tricky to instantly understand what these operators do during a code review, but after a few weeks, everyone on the team got the hang of it.

2. Promise.any

Promise.any accepts an array of promises and resolves as soon as any of the supplied promises become resolved.

It sounds difficult, so here is an example:

We make three requests simultaneously. When one of the requests resolves, Promise.any also resolves and logs the first resolved request in the console (in our example, it’s Google).

If all promises were rejected, Promise.any throws a new type of error: AggregateError.

What’s new about it is the AggregateError object represents an error where several errors are wrapped in a single error.

Here is how it looks:

e.errors is an array of the errors object.

3. Numeric Separators

Numeric separators give us the ability to separate thousands with an underscore (_) in numeric literals.

How is it useful? It makes our code more informative and readable.

Here is an example:

Conclusion

Thanks for reading!

If you want to try these three new features of ES2021 right now, you can use these Babel plug-ins:

--

--