var array = ['I', 'hAve', 'theSe', 'ITEMs'], query = 'these', result = array.findIndex(item => query.toLowerCase() === item.toLowerCase()); console.log(result); // 2
array.filter(s => s.toLowerCase().includes(str.toLowerCase()))