Echo JS 0.11.0

<~>
tracker1 945 days ago. link 2 points
Probably worth adding to the examples...

    typeof undefined === "undefined"
    typeof NaN === "number"

NaN in particular, along with Invalid Date can be interresting corner cases in practice.  I find it's often best to rely on coercion and input validation over type checking.

The first followup to this should probably be falsey values, and how knowing them is useful for input validation.

Replies