Want to retrieve a unique array of values from an array that may include duplicate values? You can use new JavaScript spread operator with Set to get an array of unique values:
code:
var j = […new Set([1, 2, 3, 3])] >> [1, 2, 3]
Retrieving unique values from an array with JavaScript.
0 comments, (694 reads) All Articles by, GabbyGirl