let

let declares a block scope variable.

Syntax

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

Examples

Single Declare and Assign

Single Declare then Assign

Multiple Declare and Assign

Multiple Declare then Assign

Scope

Internal

const

var

External

Mozilla Developer Network

Home Menu