fill() 方法,用于添加替换 数组内的某个元素
let arr = ['1', '2', '3'];
arr.fill('4', 0, 1)
console.log(arr)
let list = ['1', '2', '3', '4'];
list.fill('5', 0, 1, 2)
console.log(list)
fill() 方法,用于添加替换 数组内的某个元素
let arr = ['1', '2', '3'];
arr.fill('4', 0, 1)
console.log(arr)
let list = ['1', '2', '3', '4'];
list.fill('5', 0, 1, 2)
console.log(list)