Understanding Var, Let and Const | ES6 Guide

Before the release of ES6, var it was the only option to declare variables in javascript. ES6(ES2015) introduced some new features like let and const for declaring variables in javascript.

Let’s understand the usage of each notation how and where it is used :

1. Var

2. Let

3. Const

ES6 has a lot of new features like Template literalsDefault ArgumentsArrow FunctionsArray and Object DestructuringMap, Reduce and FilterRest and Spread OperatorObject LiteralsClasses and a lot more.

If you write code in a javascript and still not familiar with ES6 concepts. You should consider googling these topics.

Here I have written a comprehensive guide to learn ES6, please consider checking out.

That's all I have for today, stay tuned for the next post !