1

It is said that null, in JavaScript, is a primary type. However, when I use the operator typeof on null, it returns "Object".

What is the underlying procedure that made typeof to return "Object" instead of "Primitive" or "null"?

Dat V.
  • 183
  • 2
  • 7

1 Answers1

1

Type of null is object.

you can check type of any variable with typeof keyword. for example

typeof null

check the link below for more details.

Abdul Qayyum
  • 1,024
  • 7
  • 15