Getting cheap web hosting doesn’t mean the services are also cheap. Sometimes web hosting companies are just offering competitive prices for their awesome services.
semicolons allows us to group multiple statements on one line.
x = x + 1; y = 20; z = x+y;
As the semicolon is optional, we can represent above statements separated with a line-break.
x = x + 1
y = 20
z = x+y
Depending on the task a statement perform, they are categories as:
- Conditional Statements
- Loop Statements
- Object Manipulation Statements
- Comment Statements
- Exception Handling Statements
for (x=0; x < 10; x++)
document.write("x="+ x +"<br>");
- Do not use reserved keywords as variables, function names.
- Omitting semicolons is not a good programming practice; you should get in the habit of using them.