Consider the following code segment containing an if-else statement: if (x > y) { y = x;

Question:

Consider the following code segment containing an if-else statement:

if (x > y) {

y = x;

}

else if (x == y) {

x = 100;

}

alert('x = ' + x + ', y = ' + y);

Given the following assignments, predict the output that the preceding code would produce:

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: