v2
1/15/2024 by ferahl -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
// Create an array of numbers up to 1000 and shuffle them
const indexes = new Array(1000).fill(0).map((_, i) => i)
indexes.sort(() => Math.random() - 0.5);

// Put them in an Object and Map
const map = indexes.reduce((o, k) => {
    o[k] = k
    return o
}, {})

const es6Map = new Map(indexes.map(v => [v, v]))

delete caserun single casemove downdrag and drop case


ready



for (let i = 0; i < 1000; i++) {
    if (map[i] === 999) {
        console.log('gotcha')
    }
}
delete caserun single casemove updrag and drop case


ready



for (let i = 0; i < 1000; i++) {
    if (es6Map.get(i) === 999) {
        console.log('gotcha')
    }
}
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN