+ 3

x+=2+(y+=3); is working,but why x+=2+y+=3 is not working?

20th Sep 2021, 1:09 PM
KAZI MD SHAKIB HASSAN
KAZI MD SHAKIB HASSAN - avatar
3 Answers
+ 2
Martin, Just need clarity ... Isn't `y += 3` a statement instead? I'm guessing it was supposedly to be on its own rather than being a sub-expression. Is that why?
20th Sep 2021, 2:35 PM
Ipang
+ 1
1. x = x + 2 + ( y = y + 3) x = x + 2 + ( 3 ) x = 5 2. x = x + 2 + y = y + 3 It’s not logical
20th Sep 2021, 1:22 PM
Kazi
Kazi - avatar
+ 1
Martin, Thanks for the clarification 🙏
21st Sep 2021, 2:32 AM
Ipang