Files

9 lines
705 B
Markdown
Raw Permalink Normal View History

2026-01-13 15:03:30 +01:00
# Unless
2026-01-13 16:50:12 +01:00
`unless` is a conditional statement in Ruby that executes a block of code only if a specified condition is false. It's essentially the opposite of `if`. If the condition provided to `unless` evaluates to false, the code block is executed; otherwise, the code block is skipped. It provides a more readable way to express negative conditions.
Visit the following resources to learn more:
- [@article@Unless statements](https://www.theodinproject.com/lessons/ruby-conditional-logic#unless-statements)
- [@article@Read This Post 'Unless' You're Not A Ruby Developer](https://jesseduffield.com/Unless/)
- [@video@Ruby Programming Tutorial - 16 - unless](https://www.youtube.com/watch?v=2iysMciUQpw)