Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check multiple values in if condition in javascript

var matches = ['Argentina','Australia','Brazil','Canada','China','Colombia','France','Germany','Indonesia','India','Italy','Japan','Malaysia','Mexico','Philippines','Russia','South Africa','Sweden','Switzerland','United Kingdom','USA'];
if (~ matches.indexOf(item[i].innerText) …
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #multiple #values #condition #javascript
ADD COMMENT
Topic
Name
2+7 =