Answers for "array duplicate in nodejs"

1

javascript create array with repeated values

Array(5).fill(2)
//=> [2, 2, 2, 2, 2]
Posted by: Guest on February-17-2021
0

find duplicates array javascript

let arr = [1, 7, 8, 9, 10, 20, 33, 0, 20, 7, 1]
console.log([... new Set(arr)]
// Output : [1, 7, 8, 9, 10, 20, 33, 0]
Posted by: Guest on October-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language