SyntaxFix
Write A Post
Hire A Developer
Questions
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.