v1
- by lffg 8/19/202100
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
function* indiceArray(tamanho) {
    let indice = 0;
    while(true) {
        yield indice;
        indice = (indice + 1) % tamanho;
    }
    return indice;
}

function makeCircular(arr) {
  var current = -1;
  return function() {
    current = (current + 1) % arr.length;
    return current;
  }
}

const a = Array.from({ length: 200 }, () => Math.random());
delete caserun single casemove downdrag and drop case


ready



const circ = indiceArray(a.length);
void a[circ.next().value];
delete caserun single casemove upmove downdrag and drop case


ready



const next = makeCircular(a);
void a[next()];
delete caserun single casemove updrag and drop case


ready



let i = 0;
void a[i++ % a.length];
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