function hoisting like var

Igor Bukanov igor at mir2.org
Sat Jul 26 03:25:51 PDT 2008


2008/7/26 Ingvar von Schoultz <ingvar-v-s at comhem.se>:
> Do you really think {{ }} appears in existing code, correctly
> enclosing statement blocks, with the {{ and the }} placed tightly
> together both at the beginning and at the end?

Yes: I have seen the code like

if (x) {
   {
      code
   }
}

Now pass through a JS compressor that removes redundant whitespace and
you get precizelly {{ }}.

In addition, those {{ can happen in a code generator.

Regards, Igor



More information about the Es4-discuss mailing list