const exampleArray = [
"Can't predict now",
"Concentrate and ask again",
"Don't count on it",
"My reply is no",
"My sources say no",
"Outlook not so good",
"Very doubtful"
]
for (i = 0; i < responses.length; i++) {
if (responses[i].includes("no")) {
alert(`hit at ${responses[i]}`)
}
}
I'm trying to write a program that will search through an array and find any instances of "no" in the strings in the array. The issue is I'm also detecting instances of "not" or "now" when all I want is instances of "no" specifically.