jeudi 5 mars 2020

Conditional to compare three values

I am trying to determine if there is a way for me to write an if statement that will result in true if three values are equal to each other.

EX:

if a == b == c
   puts "true"
end

Instead of having to write:

if a == b && a == c && b == c

Aucun commentaire:

Enregistrer un commentaire