JS Tilda
var foo = "hello world";
if (~foo.indexOf("w")) {
// item in list
} else {
// item not in list
}
Puzzled Puffin
var foo = "hello world";
if (~foo.indexOf("w")) {
// item in list
} else {
// item not in list
}
var foo = "hello world";
foo.includes("w"); // true
foo.includes("z"); // false