Logical AND (&&) precedence

26 views
Skip to first unread message

Daveyon Mayne

unread,
Jul 12, 2015, 2:48:54 AM7/12/15
to polym...@googlegroups.com
I have an if statement, for example:

var a = "radio_button"
var b = "checkbox"

if ( a === "radio_button" && b === "checkbox" ) {
   alert("You have selected both radio button and checkbox");
}

Basically if I checked the checkbox first then select the radio button, I get the alert but so the reverse. Any reason?

Eric Bidelman

unread,
Jul 12, 2015, 11:22:20 AM7/12/15
to Daveyon Mayne, polym...@googlegroups.com

Do you have a working jsbin?


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/906af7d1-939b-44d3-b05b-e39ca1babf6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daveyon Mayne

unread,
Jul 12, 2015, 11:27:25 AM7/12/15
to polym...@googlegroups.com
Sorry, guys. I was trying to make it simple but I have solved the issue. It was an error in my function.
Reply all
Reply to author
Forward
0 new messages