Is the String Odd or Even?

Published by Cuurjol in

Given a string, return true if its length is even or false if the length is odd.

Examples

odd_or_even("apples") ➞ true
# The word "apples" has 6 characters.
# 6 is an even number, so the program outputs true.

odd_or_even("pears") ➞ false
# "pears" has 5 letters, and 5 is odd.
# Therefore the program outputs false.

odd_or_even("cherry") ➞ true

Notes

N/A

Watch a quick demo on how Edabit works.