multiple if condition values javascript code example

Example 1: how to check multiple values in if condition in javascript

var regex = /Argentina|Australia|Brazil|Canada|China|Colombia|France|Germany|Indonesia|India|Italy|Japan|Malaysia|Mexico|Philippines|Russia|South Africa|Sweden|Switzerland|United Kingdom|USA/
if (regex.test(item[i].innerText))

Example 2: multiple conditions in javascript

let str = "fuck it I don't care";

let results = []
let results[0] = str.includes("hello") || str.includes("hi") || str.includes("howdy");

console.log(results[0]);