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"?

j08691
  • 197,815
  • 30
  • 248
  • 265
AGamePlayer
  • 6,582
  • 17
  • 52
  • 105
  • _"**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."_ – Andreas Feb 05 '21 at 14:22
  • Must be something special about `status`. If I use `foo` instead it works as expected – j08691 Feb 05 '21 at 14:23
  • Please also see [Why is the variable `closed` being logged as `false`, if I define it globally as `0`?](https://stackoverflow.com/a/51062916/4642212). – Sebastian Simon Feb 05 '21 at 14:24

0 Answers0