Concepts·3 / 9

Variables: boxes that hold values

~5 min read

A variable is a labeled box that stores a piece of data. You can change what's in the box later.

let name = 'Aurelus';
let age = 7;
let isLearning = true;

console.log(name + ' is ' + age + ' years old.');

Variables have a name (chosen by you) and a value (what's currently inside). Re-assign them by using = again.

Made with Emergent