How to check if two numbers are equal in javascript : <p>Let's say we have an array:
<code>let arr = [10,10,5,11,5]</code></p>

<p>How could I check for all the numbers that are equal? ( basically duplicates )</p>

<p>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?</p>
