v1
5/28/2021 by element131x -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
let data = ['banana1', 'banana2', 'apple1', 'apple2', 'apple3', 'apple4', 'apple5', 'apple6', 'apple7', 'apple8', 'apple9', 'apple10', 'apple11', 'apple12', 'strawberry1', 'strawberry2', 'strawberry3', 'strawberry4', 'strawberry5'];
let searchTerm = "app";
let skip = 5;
let take = 2;
const filtered = [];
  
delete caserun single casemove downdrag and drop case


ready



for (let i = 0; i < data.length; i++) {
    if (i >= skip && data[i].includes(searchTerm)) {
        filtered.push(data[i]);
        if (filtered.length === take) return;
    }
}
delete caserun single casemove updrag and drop case


ready



data
      .some((item, index) => (
        index >= skip && item.includes(searchTerm) && filtered.push(item), 
        filtered.length == take
    ))
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