diff --git a/Prog/Loops.md b/Prog/Loops.md index 7a978ba..d7c2a08 100644 --- a/Prog/Loops.md +++ b/Prog/Loops.md @@ -78,4 +78,29 @@ while ([condition]) // Repeat stuff [iterator] } -``` \ No newline at end of file +``` + +**We can also doo like the while loop** +```cs +for ( ; [condition] ; ) +{ + // repeat stuff +} +``` + +## Foreach loop +```cs +string test = "ABCD"; +foreach (char c in test) +{ + Console.WriteLine(c); +} +``` + +## Jump statements +Jump statements is something that can change the behaviour of a loop inside itself. +It's possible to change the behaviour of the loops using the following keyworkds: +- ``break`` +- ``continue`` +- ``return`` +- \ No newline at end of file