Note: This feature is available in Web Workers.
The contains() method returns a boolean indicating whether the given string is in the list.
contains(string)stringA string you want to check for the existence of in the list.
A boolean indicating whether the given string is in the list.
TypeErrorThrown if no argument is provided.