Answers for "replace duplicate values in array javascript"

1

javascript create array with repeated values

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

how to remove duplicate values in array javascript

var car = ["Saab","Volvo","BMW","Saab","BMW",];
var cars = [...new Set(car)]
document.getElementById("demo").innerHTML = cars;
Posted by: Guest on April-06-2021

Code answers related to "replace duplicate values in array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language