😇Array find, Tìm phần tử đầu tiên thỏa mãn điều kiện (ok)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
Tìm phần tử đầu tiên thỏa mãn điều kiện
const array1 = [5, 12, 8, 130, 44];
const found = array1.find(element => element > 10);
console.log(found);
// expected output: 12
PreviousCreate a form with dom with nested tags, Wrapping a set of DOM elements using JavaScript (ok)NextArray find, Tìm phần tử cuối cùng thỏa mãn điều kiện (ok)
Last updated
Was this helpful?