Answers for "str conteints js"

1

str conteints js

var string = 'Hello World';

if (string.includes('World')) {
    console.log('Yeah!');
}

// The includes() method determines whether a string contains the
// characters of a specified string. This method returns true if the
// string contains the characters, and false if not. Note: The
// includes() method is case sensitive.
Posted by: Guest on April-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language