# || (logical OR)

**URL:** <https://forum.kirupa.com/t/logical-or/82900>\
**Category:** flash\
**Created:** [March 14, 2005, 4:28pm UTC](https://forum.kirupa.com/t/logical-or/82900 "2005-03-14T16:28:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darth](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@darth](https://forum.kirupa.com/u/darth)\
**Post date:** [March 14, 2005, 4:28pm UTC](https://forum.kirupa.com/t/logical-or/82900/1 "2005-03-14T16:28:56Z")

</div>

I need to evaluate long list of variables and I want actionscript to perform an action if my variable fits into certain range.

I tried like this

if(\_global.something == “var1” || “var2” || “var3” || “var4” || “var5” || “var6”)

but it doesnt work, the usage of || needs only 2 variables…

I dont want to write my script like  
if(\_global.something== “var1”){  
samefunction();  
} else if (\_global.something==“var2”){  
samefunction();  
} else if …  
and so on

how can I write my script efficiently in this case?
