For loop help
I’m stumped on this problem I ran into in one of the SoloLearn challenges (look at the JS tab in the code below): https://code.sololearn.com/WrXtRjvf0E5d/?ref=app The output is 10, but I am having trouble wrapping my head around this. In the body of the for loop, I would expect x to be set to 0 and then incremented to 1 due to the x++ in the body. After the iteration completes, I would then expect x to be incremented to 2 due to the for loop’s x++. This would continue for each iteration and x would be incremented by 2 each time. However, this would result in an incorrect output. What am I missing?