+ 2
Two arrays
There are two arrays, with some objects, with the same keys. How possible to find equal objects in arrays?
2 ответов
+ 1
Loop through arrays and compare every value.
+ 1
var arr1=[1,2,3,4,5]
var arr2=[3,4,2,6,9]
var equals=arr2.filter(e=>arr1.includes(e))
use the filter method