Let's say we have an array:
let arr = [10,10,5,11,5]
How could I check for all the numbers that are equal? ( basically duplicates )
What i thought of is a forEach and compare every number but that's not very optimal. A filter ? Maybe. Anyone has any good ideea that would be optimal?