Join TalkersCode Now !

Get Latest Tutorials And Links On Web Development
And Get Existing Offers Via Email

Javascript Data Types

Javascript Data Types

Data Types is a very important part of any programming language.It decides the variable type like the variable is number, string, array, boolean etc.


In this datatype the variable is store any numeric value. All numbers in JavaScript are represented as floating-point values.

var a = 84983;

var b = 6783.343;

var c = 0.232;

var d = 4 x 102;


In this datatype the variable is store any character or group of character and the values is stored within quotes.

var a = " A ";

var b = " Apple ";

var c = " Hello JavaScript ";


In this datatype the variable is store eighter true or false.

var a = true;

var b = false;


In this datatype the variable is store one or more values all the values seperated with commas with quotes and arrays are written within square brackets.

var name = [ " Rahul " ];

var fruits = [ " Apple ", " Banana ", " Orange " ];

var info = [ " 21 ", " 23.50 ", " Physics " ];

Get variable type usinf typeof operator

You can get any variable type using typeof operator

var a = " Hello" ;
typeof a // it returns string

var b = 335 ;
typeof b // it returns number

var c = true ;
typeof c // it returns boolean

var d = [ " PHP ", " CSS ", " HTML " ] ;
typeof d // it returns array

Join Us With Our 21000+ Subscribers And Get Our Latest Tutorials Update Via Email

Are You Starting A New Blog
Do You Want Best Web Hosting?

Try World's Best Web Hosting Provider BlueHost
At Just $3.95/mo

Hurry Up! Limited Time Offer

Yes, I Want To Check Out BlueHost

Check The World's Best SEO And All-In-One Marketing Toolkit
For Digital Marketing Professionals SEMRUSH