将数据追加到一个数组末尾的最简单的方法是通过 push() 函数。
push()
.push() 允许有一个或多个参数,并把它“push”到数组的末尾。
.push()
var arr = [1,2,3];arr.push(4);// 现在arr的值为 [1,2,3,4]