0

In a console, type:

var status = null;
console.log(status);
console.log(status == null);
console.log(status === null);
console.log(status !== null);

enter image description here

Why null became a String "null"?

3
  • "DO NOT post images of code, data, error messages, etc. - copy or type the text into the question. Please reserve the use of images for diagrams or demonstrating rendering bugs, things that are impossible to describe accurately via text." Commented Feb 5, 2021 at 14:22
  • Must be something special about status. If I use foo instead it works as expected Commented Feb 5, 2021 at 14:23
  • Please also see Why is the variable closed being logged as false, if I define it globally as 0?. Commented Feb 5, 2021 at 14:24

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.