Created
February 17, 2020 20:10
-
-
Save denisenadal/daf3911e3eded115115c26c3b17c59f5 to your computer and use it in GitHub Desktop.
quickly get uniques from a list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ins = []; | |
var uns = []; | |
ins.forEach(function(item){ | |
if(uns.indexOf(item) === -1){ | |
uns.push(item) | |
} | |
return; | |
}); | |
console.log(uns); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment