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

The for keyword is used to defines a code block that is executed as long as a condition is true.

for (init; condition; increment) {
  // code block to be executed
}

The init statement is executed first and only once.

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

The incremtent statement is executed after every loop execution

Clone this wiki locally