Get Unique Values of an Array
Written on 05/16/20 at 03:44:12 EST by GabbyGirl
JavascriptingWant 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.

News and Comments Brought to you by: Geeks and Bloggers
The comments are owned by the poster. We aren't responsible for its content.