javascript how to push one ito an array mutiple times code example Example: javascript repeat element in array Array(5).fill(2) //=> [2, 2, 2, 2, 2]