var x = 0; // start x with the value 0
for (var i = 0; i < 10; i++) { // make a loop and do the stuff in {}.
// start with the first thing;
// while second thing is true;
// do 3rd thing each time through the loop
// i is just used to count the times we go through the loop
// i is 0 at the beginning of the loop and we continue looping
// while it is true that it is less than 10.
// each time, increment i
x = x + 1; // make x the previous value of x plus 1 (same as if we said x++)