It’s a question that often comes up and there are many places on the internet that give an inaccurate answer, so here’s the real-deal.
Javascript has three primitive datatypes:
- number
- string
- boolean
There are another two special datatypes:
- null
- undefined
The others are variations of object:
- object
- function
- array
See here for further reading.
December 23, 2009 at 7:30 pm
RegExp, Date, Error
August 28, 2010 at 1:31 pm
[...] reading Datatypes in Javascript – setting the record straight on my old blog… Categories [...]