That clears that up….

In JavaScript, a variable is undefined, even if it is declared, until it is initialized. A variable can be undeclared but initialized, in which case it is not null and is not undefined. However, in this instance, it’s considered a global variable, and as discussed earlier, not specifically declaring variables with var causes problems more often than not.

Reminded me of this.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: