Types
!no returns a boolean, returns false, although the value no is a number, adding a negation operator before any number will return false, i.e. console.log(!123 === false) . As you know, using == converts the data type to you, where using === will not.
Example
I like the example of null and undefined. While null == undefined true, null === undefined is false, because null is an object type, while undefined is, of course, undefined.
console.log("test1: " + !123);
source share