As a matter of fact, null is not a Boolean data type, but its own special 'null' data type.
According to
MSDN:
quote:
Whereas the string and number data types can have a virtually unlimited number of different values, the Boolean data type can only have two. They are the literals true and false.
And in ordinary computing, true is 1 and false is 0, which is exactly what
Math.abs() and Spunky's code return for those respective values.
Also, the
parseInt() method will return NaN if you pass a Boolean into it. However, multiplying a Boolean by 1 works.