JavaScript Variables

Variables are "containers" used to store data values for later use in your logic.

let

Use let when the value of the variable is expected to change (re-assignable).

let age = 25;
age = 26; // This is OK

const

Use const when the value should not change (constant). It is more secure.

const name = "John";
name = "Doe"; // ERROR!