Friday, February 04, 2011

ActionScript Challenge #2

What's the value of foo?

6 comments:

  1. Wow...5:38 PM

    *Brain explodes*

    ReplyDelete
  2. Nabeel Molham6:39 PM

    Don't know mat !!!!! I tested it and gave me '()' !!!

    ReplyDelete
  3. Jackson Dunstan6:42 PM

    A String with contents "()"

    This reminds me of my second C class where we'd have tests to decipher ridiculously-pointer-heavy expressions. For some reason it's much more fun when my grade isn't at stake. :-D

    ReplyDelete
  4. Wow, I get it!
    Something like...

    var john = Function.prototype.lindquist = function(){return "ActionScript Challenge"};
    var foo = john..lindquist();
    trace(foo); // ActionScript Challenge

    ReplyDelete
  5. Z1082911:46 PM

    first its declaring three vars 00, 0000 and 000

    then using the double dot notation the var foo is reading the value of the @O]=function(){return OOOO} attribute, which then returns the value of the var 0000 because they are in the same context.. i think

    ReplyDelete