Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

One Statement, Many Variables

You have the ability to declare multiple variables within a single statement.

Initiate the statement with let and delimit the variables with commas.

Example

let person = “John Doe”,

carName = “Volvo”,

price = 200;

A declaration can extend across multiple lines.

Example

let person = “John Doe”,
carName = “Volvo”,
price = 200;