JSFiddle - React, Tailwind, and code Playground

JavaScript

var items = ['x', 'y', 'z', 'a', 'b'];
var createSlots = function(slots) 
{
    slots = slots || 3;
    var slotRack = [];
    for (var i = 0; i < slots; i++ )
    {
        slotRack.push(shuffle(items.slice()));
    }
    return slotRack;
}

function shuffle(o){ //v1.0
    for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
    return o;
};

var slotmachine = createSlots();  


console.log(slotmachine);