Why does (true > null) always return true in JavaScript?

javascript

Solution

`null` is like `false` in this case, wich is `0` as a number. `true` is `1` as a number.

`1` is bigger (`>`) than `0`.

Problem

Can some tell me why the following code returns true in JavaScript? ``` console.log(true > null); //returns true ```

Original source

Related problems