Created
October 24, 2011 18:21
-
-
Save jonathantneal/1309709 to your computer and use it in GitHub Desktop.
A really nice allDefined function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isDefined(val) { | |
return val != null; | |
} | |
function allDefined() { | |
var | |
i = -1, | |
a = arguments, | |
l = as.length; | |
while (++i < l) if (a[i] == null) return false; | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment