#438. Loop count
When the green flag is clicked, this script runs. How many times in total does the inside of the loop run?
when green flag clicked set [x v] to (6) repeat until <(x) = (30)> change [x v] by (1) end
# When the green flag is clicked
x = 6
while not (x == 30):
x += 1
let x = 0;
// When the green flag is clicked
x = 6;
while (!(x === 30)) {
x += 1;
}
💡 Not sure? Build it in Scratch and try it out.