Panoramio's Blog


Functions!

January 7th, 2006 by Joaquín Cuenca Abela

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.


2 Responses to “Functions!”  

  1. 1 Johan Sundström

    Yay! I think you missed a crucial leading “s” in “she”, by the way. ;-)

  2. 2 Joaquín Cuenca Abela

    Yikes! lol :-D

Leave a Reply


For spam detection purposes, please copy the number 6778 to the field below: