[Solved] Why can’t I sort AND deduplicate my Array?
[ad_1] Shouldn’t ‘if’ allow me to remove duplicates? No, sorting will not remove elements ever. It just changes the order. Calling map(…) or forEach(…) will do the same: 1 to 1 in respect to the array’s elements. Only filter(…) and reduce(…) will iterate and modify the number of items in the returned array. BTW here’s … Read more