[ruby] drill output

Contents

Rewrite to if → unless image.png

Implementation

As you can see from the hint, the if statement executes the process when it is true, while the unless statement executes the process when the conditional expression is false. So image.png You can write in the same way by doing.

I don't know when to use it for now, but remember!

Recommended Posts

[ruby] drill output
[ruby] drill output
[ruby] drill output
[ruby] drill output
[ruby] drill output
[ruby] drill output
[ruby] drill output
Ruby input / output
Ruby standard output
Ruby logical operator drill
Ruby calorie calculation output
Output triangle in Ruby
[Ruby on Rails] CSV output function
String output method memo in Ruby
Ruby learning 4
Ruby basics
Ruby learning 5
Ruby basics
Ruby Review 2
Ruby addition
Refactoring Ruby
Ruby learning 3
2020/10/4 Morning output
Ruby print puts p printf output method
Ruby setting 2
Ruby problem ⑦
2020/10/5 Morning output
Ruby learning 2
[Ruby] Block
Refactoring Ruby
ruby calculator
Ruby learning 6
Ruby settings 1
Refactoring Ruby
Learning output
2020/10/3 Noon output
Ruby basics
Ruby memo
Ruby learning 1
Ruby Review 1
From terminal to Ruby (standard input / output)
2020/10/3 Morning output
[Ruby] Module
Drill (self-made)
[Ruby] Difference between puts and return, output and return value