Answers for "repeat an element in array in js"

0

repeat an element in array in js

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

Code answers related to "repeat an element in array in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language