Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Add items on Set
var arr = [3, 7, 8, 75, 65, 32, 98, 32, 3]; var array = [100, 3, 200, 98, 65, 300]; var mySet = new Set(arr); console.log(mySet); // Adding items of array to mySet Set.prototype.addItems = function(array) { for(var item of array){ this.add(item) } } mySet.addItems(array); console.log(mySet)
run
|
edit
|
history
|
help
0
Sort based on keys
find all prime factors of a number
Range List for JavaScript
Add property to object
Funny stuff
JSON parse
Accept matching keys in object
Lowertoupper
Count digits
Find the missing number in array