Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add multiple elements to set javascript

const mySet = new Set([1,2,3,4])
const additionalSet = [5,6,7,8,9]
mySet = new Set([...mySet, ...additionalSet])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #multiple #elements #set #javascript
ADD COMMENT
Topic
Name
9+7 =