#444. Counting down
When the green flag is clicked, this script runs. When the loop ends, what is the value of the **n** variable?
when green flag clicked set [n v] to (11) repeat until <(n) < (1)> change [n v] by (-5) end
# When the green flag is clicked
n = 11
while not (n < 1):
n -= 5
let n = 0;
// When the green flag is clicked
n = 11;
while (!(n < 1)) {
n -= 5;
}
💡 Not sure? Build it in Scratch and try it out.