Created
June 10, 2011 20:44
-
-
Save kopiro/1019734 to your computer and use it in GitHub Desktop.
The PHP isset foo ported to Javascript
This file contains hidden or 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
// To use the isset() function to determine the status of x, call isset("x"). | |
function isset(x) { | |
return typeof(window[x])=="undefined" ? false : true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment