Achtung, minen!

July 11, 2009

Filed under: Script,Web Application Techologies — Andrew @ 11:20 pm

One more “cool” thing about JS:

somevar = 100;
      function test()
        somevar = 1;
        return somevar;
        if(false) { var somevar; }

Try to guess first what these two alert()s will output in JS.

You did?

Then try to see this code running alive: js-mine.

That is what Web2 is supposed to be based on… Huh?

[update] Here is a link on Doug’s Crockford talk at Google about JS.

Doug Crockford is behind JSON spec and ECMAScript 3.1.

Probably Doug’s speech may explain why I decided to go with TIScript rather than implementing JS as it is.