Achtung, minen!
July 11, 2009
One more “cool” thing about JS:
somevar = 100;
function test()
{
somevar = 1;
return somevar;
if(false) { var somevar; }
}
alert(test());
alert(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.
Comments (6)
