In JavaScript null is “nothing” . It is supposed to be something that doesn’t exist. Unfortunately, in JavaScript, the data type of null is an object. You can consider it a bug in JavaScript that typeof null is an object. It should be null .
In JavaScript null is “nothing” . It is supposed to be something that doesn’t exist. Unfortunately, in JavaScript, the data type of null is an object. You can consider it a bug in JavaScript that typeof null is an object. It should be null .