Reassigning constants

suggest change

You can't reassign constants.

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

Prints:

Uncaught TypeError: Assignment to constant.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Declarations and assignments:
*Reassigning constants

Table Of Contents
5Declarations and assignments
16Map
17Set