ES6: Declare a Read-Only Variable with the const Keyword • March 22, 2019
let is not the only new way to declare variables. In ES6, you can also declare variables using the const keyword. const has all the awesome features that let has, with the added bonus that variables declared using const are read-only. They are a constant value, which means that once a variable is assigned with const, it cannot be reassigned. As you can see, trying to reassign a variable declared…
Continue Reading →