0

Comparision in Ruby

In second quiz regarding comparison of greater / less than, there was quiz question about 7>7.0 Can anyone explain the logic?

10th Nov 2016, 10:46 AM
Sulaiman Dawood
Sulaiman Dawood - avatar
2 Answers
+ 2
7 > 7.0 is false, because 7 and 7.0 are equal.
11th Nov 2016, 8:40 PM
Keto Z
Keto Z - avatar
0
So in terms of logical expression it would be 7 ==7.0 which is true and not truthy,right?
14th Nov 2016, 8:33 AM
Sulaiman Dawood
Sulaiman Dawood - avatar