SyntaxFix
Write A Post
Hire A Developer
Questions
No.
You want to use: .indexOf("foo") and then check the index. If it's >= 0, it contains that string.
.indexOf("foo")