Skip to main content

Series 4: Control Flow - Conditionals and Loops in Rust

This series explores how to control the flow of your Rust programs using conditionals (if/else) and loops (loop, while, for).

Articles in this Series

  1. Conditional Statements: if-else expressions (Part 1)
    • Basic conditional logic.
  2. Conditional Statements: if-else if-else (Part 2)
    • Handling multiple conditions.
  3. Using if in a let Statement
    • Ternary-like expressions.
  4. Loops: loop for infinite loops
    • Creating and breaking out of loops.
  5. Loops: while loops
    • Conditional loops.
  6. Loops: for loops and the .. range operator
    • Iterating over a range of numbers.
  7. Iterating over Collections
    • Using for loops to iterate over arrays, vectors, etc.
  8. Combining Loops and Conditionals
    • Building more complex logic.
  9. match Expressions (Part 1): The Basics of Pattern Matching
    • The basics of pattern matching.
  10. match Expressions (Part 2): Advanced Patterns