find()方法返回数组中满足提供的测试函数的第一个元素的值,否则返回的undefined
const array1 = [5, 12, 8, 130, 44];
const found = array1.find((element) => element > 10);
map()方法,返回的一个新的数组,由原数组中的每个元素都调用一次提供的函数后的返回值组成的
const array1 = [1, 4, 9, 16];
// Pass a function to map
const map1 = array1.map((x) => x * 2);
console.log(map1);
// Expected output: Array [2, 8, 18, 32]