react theo
트위터 리액트 개발자?
https://www.youtube.com/watch?v=M4CLvtCS2YU
Array.prototype.flat()
Array.prototype.find()
const array1 = [5, 12, 8, 130, 44]; const found = array1.find(element => element > 10);
const arr1 = [0, 1, 2, [3, 4]];
console.log(arr1.flat());
// Expected output: Array [0, 1, 2, 3, 4]
const arr2 = [0, 1, 2, [[[3, 4]]]];
console.log(arr2.flat(2));
// Expected output: Array [0, 1, 2, Array [3, 4]]