Awesome ES6 Features By Example

Arseniy Tomkevich
19 min readAug 28, 2018

Many Javascript developers out there are very familiar with ES5 but after a series of interviews I’ve realized that many are still not so familiar with the basics of ES6.

Some reasons are lack of support in all browser versions and a lot of projects still have to provide support for older browser versions.

In this article, I will introduce the most fundamental ES6 features. We will dive deep and explore each feature with a real life example and go over why you would use such a feature on your project.

Scope Constructs: Let and Const

In ES5 we had to keep track of our variables. A developer had to know exactly how the variables relate to function and application scope. Some functions in ES5 were created in order to operate on global variables, those would be used as “template” functions anywhere throughout the application. But a developer had to rely on debug tools in order to undertand the scope of an application.

ES6 simplifies this and makes understanding of application logic easier with the introduction of let and const variables. The premise is simple, those who read the code wouldn’t have to execute it in order to understand how it works. This translates to faster learning curve and development.

let

--

--

Arseniy Tomkevich

Tech Aficionado, Leader, Polyglot Programmer with a passion for state-of-the-art technology, cybernetics, and fatherhood