R

Ram Sharma • 193.86K Points
Coach

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);
  • (A) 11,11
  • (B) 11,10
  • (C) 10,11
  • (D) 10,10

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.