Before going through this article, Let’s understand what is the syntax?
- What is Syntax?
What is Syntax?
The syntax is a set of rules, principles that define the structure of a program in programming languages. Every programming languages have their own syntax structure.
// Variable declaration var a, b, c; //assign value a = 12; b = 45; //Compute the values. c = a + b
Numbers are written with or without decimal.
12.90 12 450
String are text that can be written within single or double quotes.
- The identifier does not start with digits.
- The identifier starts with letters ( Uppercase or Lowercase ).
- Identifier also start with underscore ( _ ) and Doller sign ( $ ).
- An identifier can contain Alphabet, Digits, Underscore, and Doller sign.
var name; var roll_no; var address12;
An expression is a combination of variables, values, and operators which compute a value. The combination is called evaluation.
In above example x * 10 and 5* 3 represent the expression.
var x, y, z; x = 30; y = 56 z = x + y;
Fore More Information:- Click Here