• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 703
  • 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?
1 Solution
if(X == 53 && ( Y == 0 || Y == 2)) {
  /do stuff
electricd7Author Commented:
wow...that was quick.  I will test it out, thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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