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
- Conditional Statements:
if-else
expressions (Part 1)- Basic conditional logic.
- Conditional Statements:
if-else if-else
(Part 2)- Handling multiple conditions.
- Using
if
in alet
Statement- Ternary-like expressions.
- Loops:
loop
for infinite loops- Creating and breaking out of loops.
- Loops:
while
loops- Conditional loops.
- Loops:
for
loops and the..
range operator- Iterating over a range of numbers.
- Iterating over Collections
- Using
for
loops to iterate over arrays, vectors, etc.
- Using
- Combining Loops and Conditionals
- Building more complex logic.
match
Expressions (Part 1): The Basics of Pattern Matching- The basics of pattern matching.
match
Expressions (Part 2): Advanced Patterns- More advanced patterns and the
_
wildcard. - Next Series: Working with Collections - Vectors, Strings, Hash Maps
- More advanced patterns and the