What would be a nice algorithm to remove dupes on an array like below…
var allwords = [ ['3-hidroxitiramina', '3-hidroxitiramina'], ['3-hidroxitiramina', '3-hidroxitiramina'], ['3-in-1 block', 'bloqueo 3 en 1'], ['abacterial', 'abacteriano'], ['abacteriano', 'abacteriano'], ['abciximab', 'abciximab'], ...
Just to clarify, I would want one of the
['3-hidroxitiramina', '3-hidroxitiramina'],
To be removed, so there is just one
[edit]: misread, after reading your clarification I’d suggest:
(reversing the loop is a optimization step)