I need to check if some string contains another string (substring) so can someone tell me which one of this perform faster:
someString.includes(thisSubstring) or
someString.indexOf(thisSubstring) !== -1
It depends from the browser? Are there any faster solutions?
includeschecks. Then another loop with a timer that performs nindexofchecks. Then come back here, post the fiddle along with your answer of which one is faster.