String.prototype.includes does not exist in Internet Explorer prior to version 12:
I think it can be replaced with
"A test string".includes("est");
can be replaced (with a little modification to the logic) with:
"A test string".indexOf("est");
.includes() returns a Boolean result
.indexOf() returns -1 if the string is absent, or the character index of its position; logic needs to test for -1 rather than Boolean false.