Using Data Types in Javascript Tutorial 3

Using Data Types in Javascript Tutorial 3



You need to use string in double quotation. Here is an example of string

myVariable = "Khan" 

No use of double quotes. Otherwise it will considered as string. Write number or decimal number without double or single quotes.

myVariable = 420 


Boolean has only two crew members. True and False. In simple words Boolean is either true or fasle.

myVariable = true 
myVariable = false 

Always write Boolean without double or single quotes.


Array is collection of variables. You can access each member easily.

var myArrayName = [1,'khan',343,"54",343]

How to access elements of array?


Want to Read more about array


A standalone entity, with properties and type. But in simple words it is a custom variable which more than one members.

var person={first_name:"khan", last_name:"babo" age:22, single:true}


Null is a special value. It shows an empty or unknown value

var person = null


If you don’t assign a value to a variable and print it. It will print out as null

var person


Infinity represent the concept of an infinit number

var person = 32/0 

32 divided by zero is inifinity.





Tony BB

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: