Re:TypedJS: Sanity Check your JavaScript
by reginaldo on Wednesday February 08, 2012 @06:10AM
(#3566091)
Sometimes, and I mean just sometimes, it is better to just use ===. For instance, I recently wrote some code where a variable has a value of type Number, but I use "false" to signal the absence of such value (in the sense that the value is not available yet). In that case, I have to use stuff like if(x !== false), because "0" is a valid value in that context.
[ Parent
| on HN ]
There are no comments on this comment yet.