Comments in JavaScript
- Single Line Comments- Consist of a double forward slash (//) followed by the comment. For Example.
- Multiline Comments- Consist of one Forward Slash and an Asterisk (/*) and ends with one Asterisk and a Forward Slash (*/).
- //alert('Welcome to the first class of C# with JavaScript');
- /*alert('Welcome to the first class of C# with JavaScript');*/
Case Sensitivity
- alert('Welcome to the first class of C# with JavaScript');
The preceding code works as usual and shows an alert box on the screen. But:
- Alert('Welcome to the first class of C# with JavaScript');
The same is the case of a variable as follows:
- var hello = "hello";
- alert (hello);
The preceding code shows the value of hello variable in the alert box. But:
- var hello = "Hello";
- alert (Hello);
Data Types in JavaScript
There are the 3 major types of variables in JavaScript:
- Numbers = 10, 10.23
- Boolean = True/False
- String = 'Welcome',"Welcome"
The data types are dynamically converted at the runtime depending on the value stored in them.
A variable is declared using a "var" keyword as follows:
- var a = 10;

Tom MohanPosted Mar 1, 2015, 5:54 AM
we are expecting more articles from you . Nice start
Rahul Kumar SaxenaPosted Feb 28, 2015, 10:49 PM
Nice