Reputation: 12507
What are JavaScript Data Types?
Upvotes: 30
Views: 19027
Reputation: 96
Javascript has a typeof
operator that returns a string that names the datatype of its argument. So, you could say that the datatypes in Javascript are all the possible return values of this operator. Look here:
https://developer.mozilla.org/en/JavaScript/Reference/Operators/typeof
Upvotes: 2
Reputation: 15599
There are five primitive data types in JavaScript:
Everything that is not a primitive is an object.
Upvotes: 17
Reputation: 28810
There's
Note that there isn't a separate Integer, just number - which is represented as a double precision floating point number.
There's also
all of which are Objects deep down, but with enough special wiring to be mentioned on their own.
Upvotes: 25