Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Variable scope in Javascript driving me nuts
- Date: Fri, 27 Aug 2010 11:19:17 +0900
- From: Darren Cook <darren@example.com>
- Subject: Re: [tlug] Variable scope in Javascript driving me nuts
- References: <4C769657.5040705@example.com> <AANLkTi=MpJfrodyvEZw7urO7yED-vOKfYMaVUJqwMJ2t@example.com> <4C76F9B1.8010802@example.com>
- User-agent: Thunderbird 2.0.0.24 (X11/20100317)
> When you reference a variable called "valid" in checkResult it first > checks the functions local variables it finds none. So it goes up to the > closure scope and finds "valid" there. If it didn't find it there it > would look in the global scope. And if it didn't find it there it would > create a new local (though you might get a warning about not using the > "var" keyword). That last sentence was wrong, sorry! If it didn't find it then it would create it as a global, not a local. Darren -- Darren Cook, Software Researcher/Developer http://dcook.org/gobet/ (Shodan Go Bet - who will win?) http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles)
- References:
- [tlug] Variable scope in Javascript driving me nuts
- From: Dave M G
- Re: [tlug] Variable scope in Javascript driving me nuts
- From: Romeo Theriault
- Re: [tlug] Variable scope in Javascript driving me nuts
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: [tlug] .bashrc not being source correctly
- Next by Date: Re: [tlug] .bashrc not being source correctly
- Previous by thread: Re: [tlug] Variable scope in Javascript driving me nuts
- Next by thread: Re: [tlug] Variable scope in Javascript driving me nuts
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links