Javascript variables uses to contain information.
Syntax:
var <name> = <value>
Ex:
var No1 = 5;
var No2 = 10;
var total = No1 + No2;
Javascript Variable names;
1. must begins with a letter
2. can begins with $ or _
3. are case sensitive
How to define a Javascript Variable
1. Method 01
var carName = "Toyota"
2. Method 02
var carName;
carName = "Toyota";
No comments:
Post a Comment