v1
3/10/2021 by doctorderek -10
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
const SIZE_OF_ARRAY = 10;
const anArray = Array.from(Array(SIZE_OF_ARRAY + 1).keys());
anArray.shift(); // Array(10) [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]

const SEARCH_VALUE = SIZE_OF_ARRAY / 2; // i.e. 5

let foundIt = false;
delete caserun single casemove downdrag and drop case


ready



foundIt = anArray.includes(SEARCH_VALUE); // true
delete caserun single casemove upmove downdrag and drop case


ready



foundIt = anArray.filter((x) => x === SEARCH_VALUE).length > 0; // true
delete caserun single casemove upmove downdrag and drop case


ready



foundIt = anArray.some((x) => x === SEARCH_VALUE); // true
delete caserun single casemove updrag and drop case


ready



for (let index = 0; index < anArray.length; index++) {
  if (anArray[index] === SEARCH_VALUE) {
    foundIt = true;
    index = anArray.length; // break;
  }
}
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