How const can be helpful in modern Javascript
const is useful because it binds the variable to a name and means you cannot re-assign it. So you can do this:
const DAYS_WEEKEND = ["Saturday", "Sunday"];
DAYS_WEEKEND = [1,2,3]; // One cannot re-assign a const variable.
This code is following a popular convention of putting constants in capitals - as often used in C.
Â