Skip to main content


Showing posts from October 10, 2022

ES6 and beyond

Greetings! JavaScript got a boost with ES6 and new ECMAScript specifications. However, as we are used to old ways, it might feel weird to use these new features and we will miss them as well. This is a list of useful features without lengthy explanations. What to expect let, const over var Arrow functions for .. of a new loop Promise promises no callback hell async, await further simplifies the promise Template literals Default values Shorthand assignment Rest parameter Spread operator Destructuring class map, set Modules Nullability let, const over var We are used to 'var' so that we forget the problems that come with it. ES6 introduces let and const to overcome those issues. It provides block scoping that was missing in 'var'. var name = 'Jon'; // now let firstName = 'Jon'; const another = 'You can not change this'; Arrow functions We are using the function syntax from the beginning but arrow fu