+ 3
What is the output of this code & why?
let x = 5; x += x++; console.log(x);
5 Answers
+ 7
x += x++;
5 += 5++;
Since x++ is a post increment operation, the value will be first assigned to x. So you get the result as 10.
+ 5
I think you have some ideas going on in your mind, about what happens and why. Maybe you should tell what you think of it first, then others here can suggest correction, in case any was necessary.
+ 5
Ipang well, I think the output is 11. Am I right?
+ 4
Abir Sheikh
I guess now you know đ
+ 2
Ipang đ