const arr = [1, 2, 3, 4, 5, 7]
arr.fill(6, 0, 5)
console.log(arr);
const arr1 = [{ name: "张三" }, { name: "李四" }, { name: "王五" }]
const people = arr1.find(el => el.name === "张三")
console.log(people, typeof people, people.name);
const arrNum = [121, 123, 122, 56, 8, 99, 233, 0]
const filterNum = arrNum.find(el => el > 200)
console.log(filterNum);
console.log(arrNum.findIndex(el => el === 10));
const arr3 = [1, 3, 2, 6, 5, 8]
const SortArr3 = arr3.sort()
console.log(`原数组${arr3}`, `修改之后的数组:${SortArr3}`);
const arr4 = [1, 5, 4, 6]
const SortedArr = arr4.toSorted()
console.log(`使用toSorted api对数组进行排序之后:${arr4}`);
const arr5 = [1, 2, 3, 4, 5]
const reverArr = arr5.toReversed()
console.log(`使用toRevered api对数组进行反转之后,原数组:${arr5},新数组:${reverArr}`);
const arr6 = [1, 2, 3];
const newArray = arr6.with(1, false);
console.log(`使用with api 对数组进行修改之后 , 原数组:${arr6},新数组: ${newArray}`);