Issue of IF statement Script

I meet the problem as shown below. Could anyone point out what my problem is. Thank you!

@TCKEAHY I think it’s the classic IF problem we discuss on this forum when it’s presented with unequal list length.

Try this:

list[
a==true && b==true?0:
a==true && b==false?1:
a==false && b==true?2:
a==false && b==false?3:
4];
3 Likes

@AmolShah
Thanks. It works!