With the little information you give us, I would say that you do not manage the incrementation of your variable i.
const arrStr = ["hello", "asdf", "dfa"]
arrStr[0].includes("hel") // -> true
arrStr[1].includes("hel") // -> false
arrStr[2].includes("hel") // -> false
arrStr[3].includes("hel") // -> cannot read property 'includes' of undefined
If you look at the DCR’s answers you will see how to manage the incrementation
0
solved Type Error: Cannot read property ‘includes’ of undefined [closed]