Execution sequence for loop head

Never before had for more about the first loop, a known see c language question, it is achieved js:
var I = 0; var J = 10;
    for (I = 0; I <J; ++ I, J, )
    {
        IF (J == 10)
        {
            the console.log (I, J);
            J,;
        }
        J ++;
    }
    the console.log (I, J);

a) 0,10
9,9

b) 0,10
10,10

c) 10,10

d) 9,11

The correct answer is: a

Order of execution: Initialization - Analyzing - function body - then for the first 3 cycles - Analyzing - --- function body for circulation third sentence - Analyzing ......

Guess you like

Origin www.cnblogs.com/xl-leo/p/11634812.html