+ 2
Why is this code outputting 2?
I'm feeling dumb, I do not know why it's 2. https://code.sololearn.com/cYvA09ScIcFC/?ref=app
2 Respostas
+ 10
a=1,b=2
=> a++ == b
a == b (false)
a++ (a=2)
=> In expr1 && expr2, expr2 won't be checked if expr1 is false.
=> b i.e. 2 is printed.
+ 2
*facepalm* Thank you so much 😊.