Answers for "best way to find element in array js"

9

array find

const array1 = [5, 12, 8, 130, 44];

const found = array1.find(element => element > 10);

console.log(found);
// expected output: 12
Posted by: Guest on November-20-2020

Code answers related to "best way to find element in array js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language