Actionscript: math is hard! Same result.
Actionscript: if you add a type to the return value:
you get a compile error. But if you don’t add the return type, you get the same result. You might think that the Flashbuilder IDE would give a warning about unreachable code, but alas, it does not.
3. Attribute syntax can be confusing with arrays - setting an attribute on an array object can look like you’re adding an item to the array.
Actionscript: the same.
Actionscript: gives a compiler error that y is an undefined property.
Actionscript: returns 123! Maybe math isn’t so hard after all.