File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -112,14 +112,14 @@ There can also be an else statement at the end of the if statement which will ru
112112
113113``` ruby
114114value = 1
115- if value != 1
116- " 1 is not equal to 1 "
115+ if value == 0
116+ " 1 is equal to 0 "
117117elsif value > 2
118118 " 1 is greater than 2"
119119else
120- " 1 is not equal to 1 and 1 is not greater than 2"
120+ " 1 is not equal to 0 and 1 is not greater than 2"
121121end
122- # => "1 is not equal to 1 and 1 is not greater than 2"
122+ # => "1 is not equal to 0 and 1 is not greater than 2"
123123```
124124
125125## if and unless as suffix
Original file line number Diff line number Diff line change @@ -99,14 +99,14 @@ There can also be an else statement at the end of the if statement which will ru
9999
100100``` ruby
101101value = 1
102- if value != 1
103- " 1 is not equal to 1 "
102+ if value == 0
103+ " 1 is equal to 0 "
104104elsif value > 2
105105 " 1 is greater than 2"
106106else
107- " 1 is not equal to 1 and 1 is not greater than 2"
107+ " 1 is not equal to 0 and 1 is not greater than 2"
108108end
109- # => "1 is not equal to 1 and 1 is not greater than 2"
109+ # => "1 is not equal to 0 and 1 is not greater than 2"
110110```
111111
112112[ comparison-operators ] : https://www.w3resource.com/ruby/ruby-comparison-operators.php
You can’t perform that action at this time.
0 commit comments