Declaration

suggest change

JavaScript provides three variable-declaration keywords: const, let, and var. Assignment to an undeclared identifier is not a declaration: it throws in strict mode and modules, and its legacy sloppy-mode behavior should never be relied upon.

const name = 'Ada';
let count = 0;
count += 1;

const requires an initializer. It prevents reassignment of the binding, not mutation of an object stored in that binding.

const value; // SyntaxError: Missing initializer in const declaration

Feedback about page:

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



Table Of Contents