News for hackers. Stuff that matters.
Re:JavaScript Quiz Set by strager on Saturday January 19, 2013 @12:02PM (#5083896)
[SPOILERS]

I got tripped up by question #5 of one of the expert quizzes [1] due to a difference between ActionScript 3 and JavaScript [2].

In AS3, `(a).b` is equivalent to JS's `(null, a).b`. That is, the `this` binding is lost in AS3 (but not JS). I thus thought the anser was "20, 10, 10, 10", and not "20, 20, 10, 10".

AS3 is not a superset of ES3 as most people believe.

[1] http://dmitrysoshnikov.com/ecmascript/the-quiz/

[2] I have been working on an AS3 compiler lately, which is why I mixed JS and AS3.

There are no comments on this comment yet.