Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 474 Bytes

loops.md

File metadata and controls

11 lines (8 loc) · 474 Bytes

Loops

if and else let you write programs which can take branching paths, but they will still run from the beginning to the end.

Not all programs can just end though. Video games should draw their world at one second and do it again the next. If you enter the wrong password on your phone, it should ask you for your password again.

This is what "loops" are for. You run code starting from some point and then loop back to that same point and run that code again.