Skip to lesson content
Dev4Hub

Lesson 2 of 4

JS Variables

1 min read1 sectionAI tutor ready

Declaring Variables

JavaScript variables can be declared with var, let, or const.

Variable declarations

JavaScript
let name = "John";
const age = 30;
var city = "London";
console.log(name, age, city);

Output

John 30 London

You've reached the end of this lesson.

Mark it complete to keep your place in the course — it counts toward your progress and your streak.