For Each And Map Difference In Javascript