lets say I have an array of filter strings that I need to loop and check against with other passed in string.
var filterstrings = [\'firststring\',\'secondst
My option is comparing UPPER with UPPER or lower with lower transforming both sides (i did it often in SQL):
var filterstrings = ['firststring','secondstring','thirDstrIng'];
var passedinstring = 'ThIrDsTrInG3';
//used for of just to make it more readable
for (filterstring of filterstrings) {
if (passedinstring.toUpperCase().includes(filterstring.toUpperCase())) {
alert("string detected");
}
}
Prompts string detected