hwo to .contain with string in js code example
Example: string contains js
var str = "foobar"
var regex = /foo/g;
if (str.search(regex) !== -1) {
alert("string conains foo!")
}
var str = "foobar"
var regex = /foo/g;
if (str.search(regex) !== -1) {
alert("string conains foo!")
}