I\'m reading \'Professional Javascript for Web Developers\' Chapter 4 and it tells me that the five types of primitives are: undefined, null, boolean, number and string.
If null is a primitive, why does typeof(null) return "object"?
null
typeof(null)
object
in short: it is bug in ECMAScript, and the type should be null
reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null