my 3 favorite upcoming ES2020 features

Maxall4
2 min readJul 20, 2020

1. Dynamic import

I'm super excited to see ES2020 released mainly because of this one feature. It allows you to do something like this. Where you can import modules if and when you need them Instead of just importing all of your modules at the top. Here’s an example:

es2020 Dynamic Import example

2. BigInt

BigInt is a variable type in Javascript which gives you the ability to store 64-bit numbers in a BigInt variable. Instead of 32 bit, which means that it can store larger numbers than normal integers. Here’s an example:

es2020 Big Int example

3. Optional chaining

optional chaining gives you the ability to access deeply nested values without worrying if the property exists or not. If the property doesn't exist it just returns undefined instead of a critical error. Here’s an example

optional chaining es2020 example

Conclusion

es2020 has so many exciting new features for javascript These where just the ones that I'm looking forward to. You can see a full list of the es2020 features here.

--

--