Examples in JavaScript
var str = "Hello world, welcome to the universe.";
console.log(str.includes("world"));
console.log(str.includes("pig"));
var str = "Hello world";
console.log(str.startsWith("Hello"));
Creates a string with all Unicode letters from the original string mapped to their lower case.
var str = "Hello World!";
console.log(str.toLowerCase());
var s1 = "World";
var s2 = "Hello";
console.log(s1.localeCompare(s2));
console.log(s1.localeCompare('Z'));
console.log(s1.localeCompare('World'));