Fundamentals7 / 9
Up next

while loop

@main def main(): Unit =
  var i = 0
  // while repeats until the condition is false
  while i < 3 do
    println(i)
    i += 1
What you're solving

repeat while a condition holds