Ответ 1
По Стандарты ECMA 5.1, Исправлена ошибка выражения, согласно следующей таблице
+---------------+-------------------------------------------------------+
| Argument Type | Result |
+---------------+-------------------------------------------------------+
| Undefined | false |
+---------------+-------------------------------------------------------+
| Null | false |
+---------------+-------------------------------------------------------+
| Boolean | The result equals the input argument (no conversion). |
+---------------+-------------------------------------------------------+
| Number | The result is false if the argument is +0, −0, or NaN;|
| | otherwise the result is true. |
+---------------+-------------------------------------------------------+
| String | The result is false if the argument is the empty |
| | String (its length is zero); otherwise the result is |
| | true. |
+---------------+-------------------------------------------------------+
| Object | true |
+---------------+-------------------------------------------------------+
Итак, вы пропустили -0
и NaN
.
console.log(Boolean(-0));
# false
console.log(Boolean(NaN));
# false