DEV Community

Cover image for ECMAScript 2021 (ES12) new features

ECMAScript 2021 (ES12) new features

Naim Latifi on September 03, 2021

ECMAScript, the standardized version of JavaScript is increasing its popularity and is becoming powerful every day. Since the introduction of ECMAS...
Collapse
 
gajjardarshithasmukhbhai profile image
Darshit Gajjar

Hi Bro ! Great Article. One Day We will meet and drink coffe together for this amazing article you're published (--;

Collapse
 
naimlatifi5 profile image
Naim Latifi

Hi,

Thanks for your kind words, sure we will do that :)

Collapse
 
fezi32 profile image
Felix Jordan

Thank you very much for sharing. Very good compromised. I‘m looking forward to use this new stuff 🤩

Collapse
 
naimlatifi5 profile image
Naim Latifi

Thank you for your kind words Felix! Great and happy to hear! :)

Collapse
 
yashagozwan profile image
Yasha Gozwan Shuhada

Thanks 👍

Collapse
 
naimlatifi5 profile image
Naim Latifi

You are welcome :)

Collapse
 
aerodarius profile image
Dario Cruz

That's the kind of articles I want to read. Short but full of content.

Collapse
 
naimlatifi5 profile image
Naim Latifi

Great to hear Dario! Enjoy it :)

Collapse
 
jackydev profile image
JacKyDev

Heyho,

Good content. I just miss the case, Promise.any with a reject and a resolve so that is clearer.

Collapse
 
naimlatifi5 profile image
Naim Latifi

Hi JackyDev,

Thank you! Sure and I will try to explain here. With the reject if none of the promise is resolved then an Aggregate error is returned as in the example that I intentionally rejected C and D to see the error. In the case of resolve, if any of the promise is resolved in the example A resolves faster than B the result is returned and doesn't care about B. Promise.any() works in opposite way with Promise.all() where all promises need to be resolved for a single promise to resolve. Hope this made more clear when working with promise.any :)

Collapse
 
dinex profile image
Dmitry Makarov

But numeric separators exists since es 2019

Collapse
 
naimlatifi5 profile image
Naim Latifi • Edited

Thank you Dmitry! I agree but at that time it might have been in stage 3 proposal and not fully supported by all browsers.

Collapse
 
sibil70 profile image
Alexander

Hi, there! Thank you for sharing!
P.s. you need to check screenshot in "Logical AND assignment operator" part. There is a mistake in console.log

Collapse
 
naimlatifi5 profile image
Naim Latifi • Edited

Hi Alexander!

Thank you! Great catch and I see that I am printing "user" variable from my previous screenshoot instead of "num1". Will update it, thank you again :)