Skip to content

Latest commit

 

History

History

odd-or-even

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
  • Completed at: 2023-07-10T20:35:04.250Z

  • Completed languages: javascript

  • Tags: Fundamentals, Arrays

  • Rank: 7 kyu

Description

Task:

Given a list of integers, determine whether the sum of its elements is odd or even.

Give your answer as a string matching "odd" or "even".

If the input array is empty consider it as: [0] (array with a zero).

Examples:

Input: [0]
Output: "even"

Input: [0, 1, 4]
Output: "odd"

Input: [0, -1, -5]
Output: "even"

Have fun!