Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

multiple conditions for JavaScript .includes() method

const str = "hi, there"

const res = str.includes("hello") || str.includes("hi") || str.includes('howdy');

console.log(res); // true
 
PREVIOUS NEXT
Tagged: #multiple #conditions #JavaScript #method
ADD COMMENT
Topic
Name
7+8 =