usage
-
The find() method returns the value of the first element of the array that passes the test (in-function judgment).
-
Returns undefined if no element matches the condition.
-
find() is not executed for empty arrays.
-
find() does not change the original value of the array.
-
(function(currentValue, index, arr),thisValue), where currentValue is the current item, index is the current index, arr is the current array
an actual example
let test = [1, 2, 3, 4, 5];
let a = (item => item > 3);
(a); //4
let b = (item => item == 0);
(b); //undefined