Is there a way in jquery to do the following:
if ( (a && b) || c ) {
// run code only in case of c
// run code in case of a&b or c
}
or do I have to put this into separate if-clauses?
Thanks for inputs!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure what this has to do with jQuery, but yes, you’d need to use something like an
if()to determine which one caused the initialif()to succeed.Or if there’s code that should always run if it passes the first test, then…