If I have a statement in JavaScript like:
if(!me.a || !me.b || !me.c) {
// I want to know which not was matched here
}
How do I know which conditional was matched inside the scope? Is there any magic operator?
If I have a statement in JavaScript like:
if(!me.a || !me.b || !me.c) {
// I want to know which not was matched here
}
How do I know which conditional was matched inside the scope? Is there any magic operator?
Well, one way is to
&&
an identifier with each condition and check the result.