JS var vs const
//var variables can be re-declared and updated
var greeter = "hey hi";
var greeter = "say Hello instead";
//it becomes a problem when you do not realize that a variable
//greeter has already been defined before.
//const declarations are block scoped
//const cannot be updated or re-declared
const greeting = "say Hi";
greeting = "say Hello instead";// error: Assignment to constant variable.
const greeting = "say Hi";
const greeting = "say Hello instead";// error: Identifier 'greeting' has already been declared
Encouraging NeoBliz