JSFiddle - React, Tailwind, and code Playground
HTML
<div id="foo"></div>
JavaScript
var keys = [], x, total = 0;
while(total < 32) {
x = Math.floor(Math.random() * 64);
// way faster that looping through the array to check if it exists
if(keys[x] == undefined) {
keys[x] = 1;
total++;
}
}
var numbers = [];
for(x in keys) numbers.push(x);
document.getElementById('foo').innerHTML = numbers.join(', ');
console.log(numbers);