<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let ARR = ['red', 'yellow', 'blue','pink']
// 1.数组名.pop() (删除最后一个元素)
ARR.pop()
console.log(ARR)
// 2.数组名.shift() (删除第一个元素)
ARR.shift()
console.log(ARR)
// 3.数组名.splice(起始位置-索引号,删除几个) (删除指定元素)
ARR.splice(1, 1)
//ARR.splice(1) //从1删除到最后
console.log(ARR)
</script>
</body>
</html>