A computer program is a list of "instructions" to be "executed" by the computer.
In a programming language, these program instructions are called statements.
var x, y, z;
x = 5;
y = 6;
z = x + y;
Values, Operators, Expressions, Keywords, and Comments.
Fixed values are called literals. Variable values are called variables.
The most important rules for writing fixed values are:
Numbers are written with or without decimals:
The values can be of various types, such as numbers and strings.
For example, "John" + " " + "Doe", evaluates to "John Doe":
"John" + " " + "Doe"
The var keyword tells the browser to create variables:
var x, y;
x = 5 + 6;
y = x * 10;
Historically, programmers have used three ways of joining multiple words into one variable name:
first-name, last-name, master-card, inter-city.
first_name, last_name, master_card, inter_city.
FirstName, LastName, MasterCard, InterCity.
firstName, lastName, masterCard, interCity.
Unicode covers (almost) all the characters, punctuations, and symbols in the world.