Skip to content

Instantly share code, notes, and snippets.

@kopiro
Created June 10, 2011 20:44
Show Gist options
  • Save kopiro/1019734 to your computer and use it in GitHub Desktop.
Save kopiro/1019734 to your computer and use it in GitHub Desktop.
The PHP isset foo ported to Javascript
// 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