es6 · ES6 Basics
ES6 introduces a special "const" declaration. Do you know what it does?
const PI = 3.14;
console.log(PI) //Prints 3.14Answers
- It is exactly the same as let.
- It is used to define math-related variables.
- Const turns variables into constants, and they can't be changed.