No ready-made functions are available for appending arrays to JS arrays. I have been used to a for so many years. push. apply (a, B); this kind of self-thinks cool, does not need to write the for loop, and has never encountered any problems, it was not until today that I want to append B to be a large array. A = new Array (); B = new Array (125624);. push. apply (a, B); the above Code throws the following exception in chrome mac: Uncaught RangeError: Maximum call stack size exceeded if you change the Array to B = new Array (125623 ); A small element is enough. I tested the problem that other browsers have large arrays, but the critical values of different browsers vary. Searching the http://stackoverflow.com/questions/1374126/how-to-append-an-array-to-an-existing-javascript-array/17368101#17368101 found that someone encountered such a pitfall: Array. prototype. extend = function (other_array) {/* you shoshould include a test to check whether other_array really is an array */other_array.forEach (function (v) {this. push (v)}, this) ;}the advice is to be honest and practical, not only to avoid exceptions in large arrays, but also to consider forEach from the performance perspective is the fastest