Rewrite to if → unless
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 You can write in the same way by doing.
I don't know when to use it for now, but remember!
Recommended Posts