Getting Started with Modern JavaScript — Variables and Scope

In this article, we introduce variables and scope in JavaScript.

Variables

A variable is a named container with a unique name for storing data values. The statement below declares a variable with the name “car”:

let car;console.log(car); // undefined