Created
April 24, 2019 16:56
-
-
Save adyngom/b12afcf7cc20d5ff923d0eda715824a7 to your computer and use it in GitHub Desktop.
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
if(!Array.prototype.uniq) { | |
Array.prototype.uniq = function() { | |
return this.reduce( (arr, val) => { | |
if (!arr.includes(val)) arr.push(val); | |
return arr; | |
}, [] ) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment