Example Add new elements to the end of an array, and return the new length: <script type="text/javascript">var fruits = ["Banana", "Orange", "Apple", "Mango"];document.write(fruits.push("Kiwi") + "<br />");//返回数组长度,5document.write(fruits.push("Lemon","Pineapple") + "<br />");//返回数组最末位的值:7document.write(fruits);</script> The output of the code above will be: 57Banana,Orange,Apple,Mango,Kiwi,Lemon,Pineapple