Javascript supports following data types 


In javascript number refers to either decimal value or a plain number .Hence the following codeis valid. Var num1=10.567;//number with decimals Var num2=10;//number without decimals


In java script string represents series of characters. String data can be placed in single quotations or double quotations. var v1="palle technologies"; var v2='skillgun'; You can use single quotes in double quotes or double quotes in single quotes. var v3="oh! It's awesome "; var v4="skill gun" is best for learning javascript ;


In Java script Booleans can store either a true or false value. var v1=true; var v2=false ;


Array in Javascript used for storing logically related group of values under a single variable name. Arrays in Javascript can be declared by using square brackets as shown below. var indianCities=['Bangalore','Delhi','Pune','Chennai','Mumbai','Kolkata']; In Java script arrays are zero based index. Hence for accessing 3rd element we must use the following code. indianCities[2];


In java script objects are written with curly brackets. Each object may have any number of name and value pairs. Each name and value pair are seperated by using comma [,]. In the following sample name, age and exp are properties of doctor. var doctor={ name: 'Dr.sailaja', age:36 ,exp:6 } ; we can access name of doctor using doctor [dot] name as shown below. ;


In javascript we can assign null into any data type variable. varemployee=null;


Javascript assigns undefined when user is not assigning any value into a declared variable. var v; alert(v) displays undefined.

typeof operator:

In javascript we can identify data type of any variable using typeof. typeof ('palle' ) returns string . var v=false; typeof(v) returns Boolean. var friends=['rama','lok','satish','purru']; typeof(friends) returns object. Same way typeof(3.678) returns number. Note: do not declare number/string/boolean as data types