JavaScript variables and constants

A variable gives a name to a value so your program can use it later.

What you will learn

Minimal example

let count = 0; count = count + 1; const siteName = 'Yugien';

Use let when a variable needs a new value and const when the binding should not be reassigned.

Common mistakes