4 ms·
This runs it randomly 1000 times (well not reaaally randomly, but it gets close), just paste it into the browser console: const times = 1000; function sleep(m
by kojackst 7y ago
This runs it randomly 1000 times (well not reaaally randomly, but it gets close), just paste it into the browser console:
const times = 1000;
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function run() {
for (let i = 0; i < times; i++) {
await sleep(10);
play(Math.floor(Math.random()*3));
}
}
run();