how to check if a variable matches a string javascript code example Example: javascript string contains function s = "Hello world"; console.log(s.includes("world"));