js创建数组添加元素

来源:互联网 发布:中国第一代程序员 编辑:程序博客网 时间:2024/06/06 19:45
var a = [];// 创建数组
a.push(1); // 添加到最后
a.unshift(); // 添加到第一个位置
0 0