Skip to content
Frederik Tobner edited this page Nov 1, 2022 · 1 revision

A while loop is used to execute a block of code as long the specified condition is true.

while (condition) {
  // code block to be executed
}

The condition is checked before every loop execution and if the coondition is falses the loop is terminated.

Clone this wiki locally