Statements

const declaration

Try the free JavaScript compiler

Declares a block-scoped lexical binding that cannot be reassigned. An ordinary const declaration requires an initializer. The restriction applies to the binding, not the mutability of an object assigned to it.

Formal Syntax & Structure

javascript syntaxjavascript
const name = expression;

Working Example

Example Snippetjavascript
const price = 7;console.log(price * 2);
JavaScript Reference