Variables are used to store data in JavaScript. You can declare variables using let
, const
, or var
.
let name = "John"; // Mutable const age = 25; // Immutable var isOld = false; // Avoid using var
Use let
for values that change and const
for values that don't.