Converting Python to JS: color list multiplication

I need to assign colour randomly to 80 words, so I use this Python code:

Begin experiment

colorList = ['red', 'green', 'blue']*80
shuffle(colorList)

Begin Routine
best_color = colorList.pop()

Using a JS version of this code does not create an error, however after 3 iterations, all words are displayed in black. I tried different versions of JS code, but none of them works. Do you have any idea how to fix this?

Begin experiment

colorList = Array(80).fill(["red", "green", "blue"]).flat()
shuffle(colorList);

or

colorlist = (['red', 'green', 'blue'] * 80);
shuffle(colorList);

Begin routine
best_color = colorList.get(1);

You could try a concat loop.

colorList = ["red", "green", "blue"];
for (i = 0; i < 80; i++){
    colorList = colorList.concat(colorList);
}
shuffle(colorList);