Some method
Array1.some (callbackfn[, Thisarg])
The callback function CALLBACKFN is called for each element in the array array1, and the some method terminates when the callback function returns TRUE or iterates through all the arrays. Optional parameter Thisarg can replace the This object in the callback function
Filter method
Array1.filter (callbackfn[, Thisarg])
The callback function Callbackfn method is called by each element in the array array1, and the method returns a new collection of elements that return true in the callback function. Optional parameter Thisarg can replace the This object in the callback function
The difference between the two
The Some method returns a Boolean value that can be used to inspect an array for an object
The filter method returns a new array that can be used to filter the objects in the array
JavaScript array Some () and filter ()