Created
December 9, 2016 08:04
-
-
Save izumskee/93ec027889265aaf08b5cc287cee1d0b to your computer and use it in GitHub Desktop.
remove duplocates in js array
This file contains hidden or 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 uniqEs6 = (arrArg) => { | |
return arrArg.filter ( (elem, pos, arr) => arr.indexOf (elem) == pos) | |
} | |
// или | |
const uniqEs6 = (array) => [ ...new Set (array) ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment