Skip to the content.

JavaScript

Return to Home

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. Most known scripting language for web pages.

What are Variables?

Variables are containers for storing data (storing data values). Variables are used for holding values and are used in expressions. Declare using var, let, or const

JavaScript Identifiers

All JavaScript variables must be identified with unique names, called identifiers. Identifiers are case sensitive.

JavaScript Data Types

JavaScript variables can hold numbers like 100 and text values like “John Doe”. Text values are called strings, using quotes. Number values are written without quotes.

Value = undefined

In computer programs, variables are often declared without a value. The value can be something that has to be calculated, or something that will be provided later, like user input.