I am trying to compare two lines in JavaScript using endsWith (), for example
var isValid = string1.endsWith(string2);
It works great on Google Chrome and Mozilla. When it arrives in IE, it throws a console error as follows
SCRIPT438: Object doesn't support property or method 'endsWith'
How can I solve it?
javascript jquery prototypejs internet-explorer
Sivaprasad derangula
source share