.or rather, code and learn...
Thanks, James and MZ...
-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of James
Sent: Wednesday, September 02, 2009 10:45 PM
To: jQuery (English)
Subject: [jQuery] Re: Why is console.log(valid) returning &qu
> I think you mean:
> by using that, you are -NOT- stomping over the "outside" one.
Indeed... a classic case of thinking faster than i was typing
Behalf Of MorningZ
Sent: Wednesday, September 02, 2009 10:36 PM
To: jQuery (English)
Subject: [jQuery] Re: Why is console.log(valid) returning "yes" in this
code?
"Why?"
Because you are failing to understand "variable scope"
Don't use the "var" keyw
I think you mean:
by using that, you are -NOT- stomping over the "outside" one.
Rick,
If you don't understand, using "var" is a variable declaration.
Setting: var valid = 'no';
inside the each() callback function will have that variable exist
locally only inside that function. It will not overwr
"Why?"
Because you are failing to understand "variable scope"
Don't use the "var" keyword inside the if block, by using that, you
are stomping over the "outside" one
http://www.google.com/search?q=Javascript+variable+scope
On Sep 2, 10:26 pm, "Rick Faircloth" wrote:
> Here's the code:
>
> va
5 matches
Mail list logo