Javascript is a popular programming language best known for its use in web pages. It is a just-in-time compiled language, meaning the code is interpreted when it is run rather than needing to be compiled ahead of time.
Variables are used for storing values. There are three ways to declare a variable:
var
: The legacy methodlet
: Used when the variable can changeconst
: Used when the variable will not change.
All variables must have unique names, which are case sensitive and can contain letters, digits, underscores, and dollar signs. Variables can hold several types of data, including numbers, strings, and booleans.