The maximum length of an array is 4,294,967,295 - that is, the maximum unsigned 32-bit integer.
Testing in the browser console yields this result:

If you're making arrays that big... you have problems. Problems like this guy from Computer Stupidities
At my previous job, we were porting a UNIX system to Windows NT using Microsoft VC++. A colleague of mine, that was in the process of porting his portion of the code, came to me, looking really upset.
- Colleague: "Hey! I hate these Microsoft guys! What a rotten compiler! It only accepts 16,384 local variables in a function!