I have a code like:
var valid = viewName.contains('/');
which works fine in firefox browser. But in chrome it is undefined
. Why is that so? Is it true that chrome has not such a method for string?
Is it OK to use indexOf
instead of contains
, is it supported in all browsers?