It works with async: false. Apparently async: false is not the default I imagined it to be. Thanks for the example.
The array initialization var a = []; just uses an array literal instead of an array constructor. See http://answers.oreilly.com/topic/2151-when-to-use-the-array-literal-notation-in-javascript/