Friday, 30 March 2018

Data types In JavaScript

Data types are used to store different values in the variable.
JavaScript is a dynamic or loosely-typed language because a variable can hold value of any data type.
Types:
 There are two types of data types in JavaScript.they are
   1)primitive data types
   2)non-primitive data types
primitive data types
1.     String
2.     Number
3.     Boolean
4.     Null
5.     Undefined
non-primitive data types
1.     Object
2.     Date
3.     Array
Example:
     var x=40;//holding number  
     var y="Rahul";//holding string  
var  z= true; //holding boolean
var  b= null; //holding null
var  a= undefined; //holding undefined
 

 

No comments:

Post a Comment

Global Infrastructure and its components in AWS

You may operate your workloads wherever and however you choose with the AWS Global Infrastructure, and you'll use the same network, cont...