JavaScript TypedArray find() MethodThe JavaScript find() method is used to get the value of the first element in the array that satisfies the provided condition. The find() method apply the function once for each element present in the array. The function returns a true value, if it is found in the array and does not check the remaining value. Otherwise,it returns undefined.
Syntax:Parameters:Value (required): The value of the current element. Index (optional): The array index of the current element. Arr: The array object the current element belongs to. Return value:It returns the array element value if the elements in the array satisfy the condition, otherwise it returns undefined. Browser Support:
Example 1JavaScript Array find() Method Test it NowOutput: 14 Example 2JavaScript Array find() Method Test it NowOutput: Undefined Next TopicJavaScript TypedArray Object |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India