This question seems simple, just need to check the documentation or try it out to know the answer. However, the difference between an expert and an ordinary person often lies in these details. An expert can delve deeply into a simple question and then provide an extraordinary answer!
Ok, first we Google this question, and then we can find the MDN documentation. This document tells us that the maximum length of an array in JavaScript is 2³²-1.