const vs let, and var in JavaScript
There are three different ways to declare a variable in JavaScript: const, let and var. Historically, var has been the only way of declaring a JavaScript variable : An addition to JavaScript -- to be specific: JavaScript ES6 in 2015 -- has made const and let available to the language: Obviously more options on how to declare and define a…