JSFiddle - React, Tailwind, and code Playground

JavaScript

Array.prototype.shuffle=function(){
       var i = len = this.length;       
       while (i--) {
          var r = Math.round(Math.random(len));
          var t = this[i];
          this[i] = this[r];
          this[r] = t;
       }
       return this;
    }
        
        
    document.write([0,1,2,3,4,5,6,7,8,9].shuffle());

    document.write('<br><br>');

    var images = ['foo.png', 'bar.png', 'girls.jpg', 'cats.png'];

    document.write(images.shuffle());