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;

Karthik Muthu KaruppanPosted Apr 29, 2015, 6:12 PM
Good one
Nihal AhmedPosted Apr 29, 2015, 5:12 AM
nice one
Sibeesh VenuPosted Apr 29, 2015, 2:21 AM
Good One
Rahul Kumar SaxenaPosted Apr 29, 2015, 1:11 AM
Good one
Nanhe SiddiquePosted Apr 29, 2015, 12:22 AM
Nice Explanation Strategy