Saturday, January 7, 2006

Functions!

I implemented functions, at last!

So now I can execute:


var a = function fact(i) {
if (i == 1)
return 1;
else
return fact(i - 1);
}

if (a(3) == 6)
"pass";
else
"fail";


And it actually says "pass"! When I showed it to my wife, she looked at me as "did it really took you so long to do just that?". Pfff, Girls.

The big thing is still missing is all the native javascript objects. I have just done the objects Object, Function and half of Array (and their respective instances).

I'm still lacking objects literals (it should take 1 or 2 minutes), and a list of little TODO items that is getting longer and longer as time passes.