Re: Good practice question: Declaring/Initializing variables inside or outside a loop ?



here you are declaring the "name" variable again and again ..

There's no chance to "declaring variable again and again" in
javascript. See 10.1.3 Variable Instantiation (ECMAScript Language
Specification).






.



Relevant Pages

  • Re: Good practice question: Declaring/Initializing variables inside or outside a loop ?
    ... javascript. ... See 10.1.3 Variable Instantiation (ECMAScript Language ... So unless name is used before the next iteration of the loop it is lost. ...
    (comp.lang.javascript)
  • Re: Function deleting itself (Deletable globals)
    ... I have been studying various guides related to Javascript, ... property of the pertinent Variable object acquires as a result of the - var - declaration will mean that the - delete foo; ... The DontDelete attributes are applied to variables during variable instantiation, before any code gets evaluated for the execution context. ... Properties of the global object created by assignment are created during the evaluation of code for an execution context. ...
    (comp.lang.javascript)
  • Re: How to avoid re-inventing the wheel
    ... Like I said, I haven't had a chance to use it in production yet, ... YUI modules and have been consistently happy with it. ... Otherwise, if you don't want to go the javascript route, I seem to ... experience using these or other libraries? ...
    (comp.lang.php)
  • Re: prototype.js bindAsEventListener without this
    ... Your opinion, which you are entitled to, could be presented more ... diplomatically (which would also increase the chance of it being ... person lacking professional skill ... JavaScript through Ruby eyes just for a different perspective on the ...
    (comp.lang.javascript)
  • Re: Javascript / Google Map API - error - please help
    ... the array fails somehow. ... Is this a JavaScript problem or a Google API ... Not without having the chance to look at the source code. ...
    (comp.lang.javascript)