Answer would be option 1. Let us dry run it.

Iteration 1:

``````--- x = 1 ---
y = --x; // y = 0 and x = 0
console.log(x++ + --y) // (0 + (-1)) = -1, and x = 1 now
while(x++ < 5) // (1 < 5) is true, and x = 2 now``````

Next Iteration:

``````--- x = 2 ---
y = --x; // y = 1 and x = 1
console.log(x++ + --y) // (1 + 0) = 1, and x = 2 now
while(x++ < 5) // (2 < 5) is true, and x = 3 now``````

Next Iteration:

``````--- x = 3 ---
y = --x; // y = 2 and x = 2
console.log(x++ + --y) // (2 + 1) = 3, and x = 3 now
while(x++ < 5) // (3 < 5) is true, and x = 4 now``````

Next Iteration:

``````--- x = 4 ---
y = --x; // y = 3 and x = 3
console.log(x++ + --y) // (3 + 2) = 5, and x = 4 now
while(x++ < 5) // (4 < 5) is true, and x = 5 now``````

Next Iteration:

``````--- x = 5 ---
y = --x; // y = 4 and x = 4
console.log(x++ + --y) // (4 + 3) = 7, and x = 5 now
while(x++ < 5) // (5 < 5) is false, and loop breaks``````
``Answer: -1 1 3 5 7``

For useful and amazing frontend and programming tutorials: https://bit.ly/devtools-yt