[Javascript] checking to see if a variable exists

Peter Brunone peter at brunone.com
Wed Mar 3 13:13:50 CST 2004


if(variable) {
	Do this with variable
	}


-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of Chris Basken

Am I losing it?  Is there a way to see if a variable exists or has been
declared or something?

You know, something like:

if (isDeclared(foo)) {...

or

if (foo.isDeclared()) {...

or something like that?





More information about the Javascript mailing list