1const string = "javascript";
2const substring = "script";
3
4console.log(string.includes(substring)); //true
1var string = "foo",
2 substring = "oo";
3
4console.log(string.includes(substring));
1const string = "foo";
2const substring = "oo";
3
4console.log(string.includes(substring));
1var email = "grepper@gmail.com";
2if(email.includes("@")){
3 console.log("Email is valid");
4}
5else{
6 console.log("Email is not valid");
7}
8// includes return boolean, if your string found => true else => false
1const s = 'I am going to become a FULL STACK JS Dev with Coderslang';
2
3console.log(s.includes('FULL STACK')); // true
4console.log(s.includes('cheeseburger')); // false