Ruby The way we learn at school Contibuted by: pufe Check if the last digit is 0, 2, 4, 6 or 8. def isEven(x) %w(0 2 4 6 8).include?(x.to_s[-1]) end