A computer program is a set of "instructions" that are performed by a computer.
In programming these instructions are called statements.
Fixed values are called literal. A variable value is called a variable.
The most important rule for writing a fixed value is:
Write the number as a whole number or a decimal:
String is text that is written in single or double quotation marks:
In programming languages, variables are used to store values.
The equals (=) symbol is used to hold values in variables.
In the following example, a is first declared as a variable by the var keyword, then 10 is placed as a value in it using the equal sign.
For example, the product of 5 * 10 is converted to 50.
Many times expressions can have variables as values:
For example, "Kamal" + " " + "Khan", plus "Kamal Khan" is:
For example, var keyword tells the browser to create a variable.
The codes after the double slash (//) or between /* and * / are treated as comments.
The comment codes are ignored and will not be edited:
Identifiers are names
The naming rules are the same in most programs.
Subsequent characters can be characters, numbers, underscores (_) or dollar ($) symbols.
The first letter will never be a number.
lastName and lastname are two completely different variables
Programmers usually use three methods to write more than one word in one word:
first-name, last-name, master-card, inter-city
first_name, last_name, master_card, inter_city
FirstName, LastName, MasterCard, InterCity
FirstName, LastName, MasterCard, InterCity.