How to check if one string contains another substring in JavaScript ?

Below is a sample code snippet that demonstrates how to check if one string contains another specified substring using JavaScript.

How to check if one string contains another substring in JavaScript ?

let stringInput = "Abundantcode.com";
console.log(stringInput.includes("com"));
%d