0> = null & # 8594; true, 0> null & # 8594; false, 0 == null & # 8594; false?

Open the console, for example, in Chrome or Firebug. Try the following:

console.log(0>=null); /* true, so let look closer: */ console.log(0>null); /* false, so it must be equal, right? */ console.log(0==null); /* false again?? */ 

http://jsbin.com/royicecidi/1/edit?js,console

So, how can 0 be greater than or equal to >= null if it is not greater than > and not equal to == ?

+6
source share

Source: https://habr.com/ru/post/988906/


All Articles