How can I know which condition in an if statement in JavaScript was true?
if(a === b || c === d){ console.log(correctValue) }
How can I know if it was either a === b
or c === d
?
Edit: I wanted to know if there was any way of doing this besides checking each condition on it's own if statement.
See Question&Answers more detail:os