.includes javascript

JavaScript
var vowels=["a","e","i","o","u"]
var consonants=''
function vowelsAndConsonants(s) {
    for(var i=0;i<s.length;i++){
       if(vowels.includes(s[i])){
           console.log(s[i])
       }else{
consonants+= s[i]+'\n';
       }
    }
 console.log(consonants);
}

 var string = "foo",
    substring = "oo";

console.log(string.includes(substring));var str = "Hello world, welcome to the universe.";

var n = str.includes("world");
 var str = "We got a poop cleanup on isle 4.";
if(str.indexOf("poop") !== -1){
	alert("Not again");
}const pets = ['cat', 'dog', 'bat'];

console.log(pets.includes('cat'));
// output: truelet storyWords = ['extremely literally actually hi bye okay']
let unnecessaryWords = ['extremely', 'literally', 'actually' ];

let betterWords = storyWords.filter(function(word) {
  return !unnecessaryWords.includes(word);
});
console.log(betterWords) // ['hi' 'bye' 'okay]
Source

Also in JavaScript: