SyntaxFix
Write A Post
Hire A Developer
Questions
Why not using indexOf from array like bellow?
indexOf
if ([foo, bar].indexOf(foobar) !== -1) { // do something }
Just plain Javascript, no frameworks or libraries but it will not work on IE < 9.