Home / Javascript Tips Generated By ChatGPT / Using String.includes to Check for Substrings in Javascript Check if a string contains a certain substring. Source Code let text = 'Hello, world!'; console.log(text.includes('world'));