Here the fastest working implementation while keeping the same array ("mutable"):. function clearArray(array) { while (array.length > 0) { array.pop(); } } More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.