Home Blog
Categories About Me Contact
Language
Español English
algorithm

Eduardo Ortega's blog

Notes from a developer

Remove Duplicates from an Array with JavaScript

This way of removing duplicates is quite simple and elegant, thanks to the methods Array.filter() and Array.indexOf(). The Array.filter() method creates a new array from an existing one, which contains only the elements that meet the filter criteria. The Array.indexOf() method, on the other hand, returns the index of the first element of an array whose value matches the one passed to it as a parameter....

javascript programming tips algorithm
Author Eduardo Ortega 11 Oct 2020
Page 1 of 1  
Eduardo Ortega's blog
Copyright © 2020
Customized EM's Casper 2.1.7 theme