I write something like this in Ruby:
if a.max == a[0]
brand = b[0]
elsif a.max == a[1]
brand = b[1]
elsif a.max == a[2]
brand = b[2]
elsif a.max == a[3]
brand = b[3]
end
a and b both are unique arrays.
Is there any way to check all if and elsif's in the same condition?
Only one condition for a[0], a[1], a[2] and a[3]?