<script>
let arr = ['孙悟空','猪八戒','沙和尚']
let result = arr.push('唐僧','白骨精')
console.log(arr)
result = arr.pop()//返回被删除的元素名字
console.log(result)
result = arr.unshift('牛魔王')//返回长度下标
arr = ['孙悟空','猪八戒','沙和尚','唐僧']
result = arr.splice(1,3)
// result = arr.splice(1,1,'牛魔王的'`,'铁扇公主','红孩儿')
// result = arr.splice(1,0,'牛魔王的','铁扇公主','红孩儿')
console.log(result)
arr = ["a", "b", "c", "d"]
arr.reverse()
// console.log(arr)
</script>