Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get unique values from arrays into a single array

const mySet = new Set([1,2])
const additionalSet = [5,2,6]
mySet = new Set([...mySet, ...additionalSet]) // {1,2,5,6}
array = [...new Set([...mySet, ...additionalSet])] // [1,2,5,6]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unique #values #arrays #single #array
ADD COMMENT
Topic
Name
7+8 =