It has an in operator, but it is limited only by object keys:
var object = { a: "foo", b: "bar" }; // print ab for (var key in object) { print(key); }
And you can also use it for checks like this:
if ("a" in object) { print("Object has a property named a"); }
To check the string, although you need to use the indexOf () method:
if ("abc".indexOf("a") > -1) { print("Exists"); }
source share