I'm trying to create arrays from arrays. I don't know how many arrays there are going to be, but here's an example.
const array0 = ['item0', 'item1', 'item2'];
const array1 = ['item0', 'item1', 'item2'];
const array2 = ['item0', 'item1', 'item2'];
How can I create 3 new arrays from these arrays like this?
const array0 = ['item0', 'item0', 'item0'];
const array1 = ['item1', 'item1', 'item1'];
const array2 = ['item2', 'item2', 'item2'];