v1
- by 10basetom 5/28/202400
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
const ARR = [
  'grinning_face_with_smiling_eyes',
  'face',
  'happy',
  'joy',
  'funny',
  'haha',
  'laugh',
  'like',
  ':D',
  ':)',
  'smile'
];

const STR = 'grinning_face_with_smiling_eyes, face, happy, joy, funny, haha, laugh, like, :D, :), smile';

const KW = 'hah';
delete caserun single casemove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
arr.filter((s) => s.includes(KW)).length > 0;
delete caserun single casemove upmove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
arr.filter((s) => s.indexOf(KW) > -1).length > 0;
delete caserun single casemove upmove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
!!arr.find((s) => s.indexOf(KW) > -1);
delete caserun single casemove upmove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
arr.findIndex((s) => s.includes(KW)) > -1;
delete caserun single casemove upmove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
arr.findIndex((s) => s.indexOf(KW) > -1) > -1
delete caserun single casemove upmove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
let isFound = false;
for (let i = 0; i < arr.length; ++i) {
  if (arr[i].indexOf(KW) > -1) {
    isFound = true;
    break;
  }
}
delete caserun single casemove upmove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
let isFound = false;
for (const s of arr) {
  if (s.indexOf(KW) > -1) {
    isFound = true;
    break;
  }
}
delete caserun single casemove upmove downdrag and drop case


ready



const arr = [];
for (const str of ARR) {
  arr.push(str);
}
arr.join(' ').indexOf(KW) > -1;
delete caserun single casemove upmove downdrag and drop case


ready



let haystack = '';
for (const str of ARR) {
  haystack += str + ' ';
}
haystack.indexOf(KW) > -1;
delete caserun single casemove updrag and drop case


ready



let haystack = '';
for (const str of ARR) {
  haystack += str + ' ';
}
haystack.includes(KW);
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