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
Replace the startsWith function with:
yourString.indexOf(searchString, position) // where position can be set to 0
This will support all browsers including IE
Position can be set to 0 for string matching from the start meaning 0th position.