Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Why won't this work????
- From: javascript@xxxxxxxxxx (Hassan Schroeder)
- Subject: [Javascript] Why won't this work????
- Date: Wed, 29 Jan 2003 14:05:03 -0800
Peter Brunone wrote: > Ah, the age-old problem of shared indices... this one still > bites me every now and then. > > You are using the variable "i" to denote an index of the fieldnames > array... but then when you go to check for bad characters, you are > using that same variable as the loop index... which is exactly why it's good practice to not use cryptic variables like "i" and "j" and "x" at all, but use something like "fieldCount", "badCharArrayCount", etc. And when you're back digging around in the code 6 months later, it'll make a lot more sense, too :-) -- Hassan Schroeder ----------------------------- hassan@xxxxxxxxxxxxxx Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code.
- References:
- [Javascript] Why won't this work????
- From: Peter Brunone
- [Javascript] Why won't this work????
- Prev by Date: [Javascript] Mrs.Ruiz
- Next by Date: [Javascript] Mrs.Ruiz
- Previous by thread: [Javascript] Why won't this work????
- Next by thread: [Javascript] Why won't this work????
- Index(es):