JavaScript Array Methods : Find()

Jack Pritom Soren - May 26 '22 - - Dev Community

The find() method returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned.

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

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

console.log(found);
//output: 12
Enter fullscreen mode Exit fullscreen mode

Find

Follow me on : Github Linkedin

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player