Compare multiple variables with a value in a single expression
ruby, variables
Solution
[a,b,3].all? {|x| x==10}
but in this case
[].all? {|x| x==10}
will also return true
Problem
I have two variables `a` and `b`. I want to compare both `a` and `b` to a value, say `10`. I can do it like this: ``` 10 == a && 10 == b ``` But, I was wondering if there is any way to write it in a single expression? (E.g. like `a == b == 10`)