Array.from

Array.from([1, 2, 3], ( x , y ) => x + y);

// 1, 3, 5
這裡的arrow function是map function,y就是index

const nestedArray = [['😉'],{kind: "🐦"},['😇']]

const abc = Array.from(nestedArray);

nestedArray[0][0] = "🐗";
nestedArray[1]["kind"] = "🦉";

console.log(...abc);

還有它不會深烤貝