This post will explain how to find a substring in a string using pure JavaScript. Let’s see how can we achieve this.
1 2 3 |
var str = 'testing'; var substr = 'tin'; alert(str.indexOf(substr) !== -1); |
The above
This post will explain how to find a substring in a string using pure JavaScript. Let’s see how can we achieve this.
1 2 3 |
var str = 'testing'; var substr = 'tin'; alert(str.indexOf(substr) !== -1); |
The above