Suppose my string is like:
var str = "USA;UK;AUS;NZ"
Now from some a source I am getting one value like:
country.data = "AUS"
Now in this case I want to remove "AUS" from my string.
Can anyone please suggest how to achieve this.
Here is what I have tried:
var someStr= str.substring(0, str.indexOf(country.data))
In this case I got the same result.