Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #20285
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.internetdienste.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-ID | <1386689.lkaUKLg8GE@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <usenet@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Fri, 14 Jun 2013 10:17:07 +0200 |
| User-Agent | KNode/4.10.2 |
| Content-Transfer-Encoding | 8Bit |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| Subject | Re: Prob with IE8 and getElementsByName() |
| Newsgroups | comp.lang.javascript |
| References | <kpc3ge$j0k$1@dont-email.me> <b1u40iFb16oU1@mid.individual.net> <b1une9FfbioU1@mid.individual.net> <XnsA1DEF15DFDE01eejj99@194.109.133.133> <timstreater-3B4D75.23190613062013@news.individual.net> |
| MIME-Version | 1.0 |
| Lines | 57 |
| NNTP-Posting-Date | 14 Jun 2013 10:17:08 CEST |
| NNTP-Posting-Host | b76deac0.newsspool3.arcor-online.net |
| X-Trace | DXC=ZNd0S3`d[?5TQL:hoD@>T?McF=Q^Z^V384Fo<]lROoR18kF<OcfhCO;?F<P;FJ26_2DZm8W4\YJN<b@mF9jNikd5BoKGPB=12A7NYjc^=]OFV= |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | csiph.com comp.lang.javascript:20285 |
Show key headers only | View raw
Tim Streater wrote:
> "Evertjan." <exxjxw.hannivoort@inter.nl.net> wrote:
>> Mel Smith wrote on 13 jun 2013 in comp.lang.javascript:
>> > for (i=0;i<ntees;i++) {
>>
>> for (var i=0; i<ntees; i++) {
>
> No:
Yes.
> 1) Can't just copy the for loop and use elsewhere.
Yes, you can.
> 2) If I decide to use i *earlier* in the code I now have to move the var.
No, the environments of an execution context are defined when control enters
an execution context, before execution (ES 5.1, §10.4; Ed. 1 to 3 used the
concept of “variable instantiation” instead). As a result,
answer = deepThought();
function deepThought ()
{
return 42;
}
var answer;
is equivalent to
function deepThought ()
{
return 42;
}
var answer = deepThought();
> 3) If I'm not sure whether i is global or not I have to search the whole
> function to find var. Much better put all the declarations at the head
> of the function.
Having to scroll up a number of lines each time for adjustments, or having
to split the edit view? Leaving unnessary variable declarations on
refactoring? Losing the relation between variable and value? Thanks, but
no, thanks.
You would be well-advised to learn the programming languages before you
criticize the code style of others.
--
PointedEars
Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Prob with IE8 and getElementsByName() "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-11 15:52 -0600
Re: Prob with IE8 and getElementsByName() Andrew Poulos <ap_prog@hotmail.com> - 2013-06-12 11:01 +1000
Re: Prob with IE8 and getElementsByName() Martin Honnen <mahotrash@yahoo.de> - 2013-06-12 14:11 +0200
Re: Prob with IE8 and getElementsByName() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-12 16:33 +0200
Re: Prob with IE8 and getElementsByName() "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-12 08:37 -0600
Re: Prob with IE8 and getElementsByName() Andrew Poulos <ap_prog@hotmail.com> - 2013-06-13 08:36 +1000
Re: Prob with IE8 and getElementsByName() "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-12 16:59 -0600
Re: Prob with IE8 and getElementsByName() Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-13 09:30 +0000
Re: Prob with IE8 and getElementsByName() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-13 13:12 +0200
Re: Prob with IE8 and getElementsByName() "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-13 08:41 -0600
Re: Prob with IE8 and getElementsByName() "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-13 14:12 -0600
Re: Prob with IE8 and getElementsByName() "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-06-13 23:43 +0200
Re: Prob with IE8 and getElementsByName() Tim Streater <timstreater@greenbee.net> - 2013-06-13 23:19 +0100
Re: Prob with IE8 and getElementsByName() "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-06-14 00:34 +0200
Re: Prob with IE8 and getElementsByName() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-14 10:17 +0200
Re: Prob with IE8 and getElementsByName() "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-06-13 08:24 +0300
Re: Prob with IE8 and getElementsByName() Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-06-12 19:01 +0100
csiph-web