const

const declares a block scope variable.

It cannot be redeclared or reassigned.

Syntax

const name1 = value1[, name2 = value2]...[, nameN = valueN];

Examples

Single

Multiple

Scope

Internal

let

var

External

Mozilla Developer Network

Home Menu