Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

compare strings to multiple strings javascript

if (fruit.match(/^(banana|lemon|mango|pineapple)$/)) {
    handleYellowFruit();
}
Source by www.tjvantoll.com #
 
PREVIOUS NEXT
Tagged: #compare #strings #multiple #strings #javascript
ADD COMMENT
Topic
Name
3+7 =