+ 2
Both these codes are same. But why the output is different ?
https://code.sololearn.com/WFID8R2Ydb82/?ref=app https://code.sololearn.com/wqVKpyo9Fj6X/?ref=app
4 Réponses
+ 5
Because they are different programming languages.
All languages have their own rules.
+ 4
In javascript the value of first x remains 4. In case of php it changes into 6.
That's why there is difference in values.
+ 2
I can see but why is it different in the above two cases?
+ 2
Oh! I thought every Programming Language has the same concept over increment and decrement operations. I didn't knew that.
Thanks for your help . 😀😀