The following code can be run without a problem in Chrome, but throws the following error in Internet Explorer 11.
Object doesn\'t support property or
text.indexOf("newString") is the best method instead of startsWith.
text.indexOf("newString")
startsWith
Example:
var text = "Format"; if(text.indexOf("Format") == 0) { alert(text + " = Format"); } else { alert(text + " != Format"); }