JSFiddle - React, Tailwind, and code Playground

HTML

<body></body>

JavaScript

Array.prototype.shuffle = function () {
    for (var i=0; i < this.length; i++) {
        var j = Math.floor(Math.random() * this.length);
        this[i] = this[j] + (this[j] = this[i], 0);
    }

    return this;
};

var x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

$('body').append(JSON.stringify(x) + "<br>");
$('body').append(JSON.stringify(x.shuffle()));