02 19 2026 - rtji0/Arthur-Tech-Journal GitHub Wiki

Loops

  • for loop - pretest

  • for(init; test; update) {}

  • end with semicolon only when loop is one line (no braces)

  • init not required but semicolon to represent it is - ie for( ; num<=5; num++)

  • variables defined within for loop header are local and can be reused