

Syntax: array.find(callback(value,index,arr),thisArg)

thisValue: This parameter optional, it holds the context to be passed as this to be used while executing the callback function.arr: This parameter optional, it holds the complete array on which Array.index: This parameter optional, it holds the index of the currentValue element in the array.element: The parameter holds the value of the elements being processed currently.

callback: This parameter holds the function to be called for each element of the array.Syntax: array.filter(callback(element, index, arr), thisValue) Filter() doesn’t change the original array.The filter() method is used to create a new array from a given array consisting of only those elements from the given array which satisfy a condition set by the argument method.This are using to find some data from the array. In this article, we will learn about how to use filter, find and findIndex methods of array in JavaScript.
