The contain method is used to search if a token has a specific key word or phrase or element. You can use let the user search for specific images or articles or add a function for those specific keywords

//Lets say that the river element has a class called "water"
const island = document.querySelector('river');
const river = island.classList;

if (river.contains('water')) {
  console.log("There's water in the island!");
}

//The output for this would be the console message since the elements class does have the key word 'water'