Q. What is the output for code A and B?
Code:
Code A: var x = 10; y = --x + 1; alert(y); Code B: var x = 10; y = x-- + 1; alert(y);
β
Correct Answer: (C)
10,11
Code A: var x = 10; y = --x + 1; alert(y); Code B: var x = 10; y = x-- + 1; alert(y);
You must be Logged in to update hint/solution