JavaScript Reassigning constants


Example

You can't reassign constants.

const foo = "bar";
foo = "hello";

Prints:

Uncaught TypeError: Assignment to constant.