Difference between Var, Let and Const in JavaScript

Before ECMAScript 6, JavaScript uses the var keyword for variable declaration. ECMAScript 6 added two new keywords to declare variables. They are let and const. So, there are three ways to declare variables in JavaScript after ES6: var, let, and…


