A computer program is a rundown of "instructions" to be "executed" by the computer.
In a programming language, these program directions are called statements.
var y = 3;
var z = x + y; </script>
Values, Operators, Expressions, Keywords, what's more, Comments.
Fixed values are called literals. Variable qualities are called variables.
The most imperative guidelines for composing fixed qualities are:
Numbers are composed with or without decimals:
Strings are content, composed inside twofold or single quotes:
In a programming language, variables are utilized to store information values.
An equal sign is utilized to assign values to variables.
In this model, x is characterized as a variable. At that point, x is appointed (given) the esteem 8:
x = 8;
var y = 8;
An articulation is a mix of qualities, factors, and administrators, which processes to a value.
The calculation is called an evaluation.
For precedent, 6* 18 assesses to 108:
Expressions can likewise contain variable values:
The qualities can be of different sorts, for example, numbers and strings.
For model, "John" + " " + "Doe", assesses to "John Doe":
The var watchword advises the program to make another variable:
var y = x * 50;</script>
Code after twofold cuts // or between /* and */ is treated as a comment.
Comments are overlooked, and won't be executed:
//var x = 3; I will NOT be executed</script>
Identifiers are names.
The rules for lawful names are much the equivalent in most programming languages.
Subsequent characters might be letters, digits, underscores, or dollar signs.
The factors lastName and lastname, are two diverse variables.
lastname = "Peterson";
Historically, software engineers have utilized three different ways of joining numerous words into one variable name:
first-name, last-name, ace card, between city.
first_name, last_name, master_card, inter_city.
FirstName, LastName, MasterCard, InterCity.
firstName, lastName, masterCard, interCity.