unshift()添加,向数组最开始位置添加值
var arr = [11,22,33,44,55];
var b = arr.unshift(99);
console.log(b);
console.log(arr);
push()添加向数组最后位置添加值
var arr = [11,22,33,44,55];
var b = arr.push(100);
console.log(b);
console.log(arr);
join()使用字符串连接数组中每两个值之间的值,输出字符串
var arr = [11,22,33,44,55];
var b = arr.join("-");
console.log(typeof b);
console.log(arr);
shift()删除数组的第一个元素
var arr = [11,22,33,44,55];
var b = arr.shift();
console.log(b);
console.log(arr);
delete运算符 delete()删除数组的值,保留长度
var arr = [11,22,33,44,55];
var b = delete arr[0];
var b = delete(arr[0]);
console.log(b);
console.log(arr)`
reverse()数组反转
var arr = [11,22,33,44,55];
var b = arr.reverse();
console.log(b);
console.log(arr);