Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 297 Bytes

even_or_odd.md

File metadata and controls

11 lines (9 loc) · 297 Bytes

Description

Create a function that takes an integer as an argument and returns "Even" for even numbers or "Odd" for odd numbers.

My Solution

def even_or_odd(number)
  number.even? ? 'Even' : 'Odd'
end