The method myArray.find(callback) returns _______ if no element passes the test.

  • NaN
  • undefined
  • an empty array
  • -1
The myArray.find(callback) method returns undefined if no element in the array passes the test provided by the callback function. This is because it signifies that no element satisfies the condition. If an element is found that passes the test, it returns that element.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *