1

According to "8.2 The Null Type" chapter of Ecma-262 "null" is type.

But typeof(null) is object, so null is just a value of type object.

How could it be?

1

1 Answer 1

2

This is a known bug. This will be fixed in ES6.

In ES6

typeof null === "null";

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.