• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 701
  • Last Modified:

Complex javascript if syntax needed.

I need to write an IF statement that looks at 2 variables X and Y.  This is how it needs to work

if X=53 AND (Y=0 OR Y=2) then do stuff otherwise dont.

In ASP, I can use () to group things together..can I do this with javascript?
0
electricd7
Asked:
electricd7
1 Solution
 
RoonaanCommented:
if(X == 53 && ( Y == 0 || Y == 2)) {
  /do stuff
}
0
 
electricd7Author Commented:
wow...that was quick.  I will test it out, thanks!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now