see: http://docs.closure-library.googlecode.com/git/closure_goog_array_array.js.source.html#line166 for the Google Closure version