#Javascript find method

''' In JavaScript find method is take argument as callback function and returns the first element which element we have to find Let's see some examples to understand easy. '''

\[let arr=[5,6,7,8,8]\] \\let num=arr.find(val=> val % 2==0) \\console.log(num) \\output:6; \\so it loop through array and it checks if it's divisible 0 it returns first match;