JSFiddle - React, Tailwind, and code Playground

by Shane Chambers

HTML

<div id="hi">

</div>

JavaScript

function randomId() {
        var arr = [];
        while (arr.length < 8) {
            var r = Math.floor(Math.random() * 100) + 1;
            if (arr.indexOf(r) === -1) {
                arr.push(r);
            }
        }
        console.log( arr.map(function (i) { return i+"" }).join(""));
    }
    
randomId();
randomId();