Google News
logo
JavaScript - Interview Questions
What are the two basic groups of dataypes in JavaScript?
There are two types of data types in JavaScript. JavaScript, also known as ECMAScript specifies six primitive data types and object (or) non-primitive data types
 
1. Primitive data type
2. Non-primitive (reference) data type
 
JavaScript has dynamic types. This means that the same variable can be used to hold different data types:

var x;     // Now x is undefined
var x = 10;     // Now x is a Number
var x = "Name";     // Now x is a String
Advertisement