/ Published in: JavaScript

Checking for `undefined` in JavaScript is weird (the variable can be redefined), so I made a function to do it. This stuff (and others) is also in my [JSTypes](https://github.com/EvanHahn/JSTypes) type-checking library.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// As a function Evan.isUndefined = function(u) { return typeof u === 'undefined'; }; // In an "if" if (typeof foo === 'undefined') { // ... }
Comments
