dunno how many devs uses this syntax which is kinda as ambiguous as var one:
doStuff(); function doStuff(){ // stuff to do here }; ... but all this is not about jQuery, is it? On Mon, Sep 14, 2009 at 3:44 PM, ajp771 <alistair.po...@gmail.com> wrote: > > Reading the specs, it becomes clear that all vars are instantiated > before execution (Matt said parsed, but to avoid doubt their values > aren't evaluated). > > Thus: > > function() { > myVar = 5; > var myVar = 6; > } > > is the equivalent of: > > > function() { > var myVar; > myVar = 5; > myVar = 6; > } > > > is valid, and keeps myVar in the function scope. > > Could lead to some very obtuse code! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---