Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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)) …
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #multiple #values #condition #javascript
ADD COMMENT
Topic
Name
3+5 =