Function Updated 13 Nov 2023
String.includes(search)
The includes() method returns true if a string contains a specified string.
Parameters
searchstringrequiredThe value to search for
Returns
True if search string is found otherwise false.
Example
Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
let text = "Hello world";
let result = text.includes("world");
write(result);
}#The template above produces this output:
true