Skip to main content

Ex Add Two Arrays

Description

Filter all numbers in an array that are even and those that are odd.

Example

Input - [0,1,2,3,4,5,6,7,8,9]
Output - [0,2,4,6,8] // even
Output - [1,3,5,7,9] // odd

More challenge

This Exercise it's to easy, lets complicated a little:

  • Add/subtract/multiply/divide/average all even/odd numbers;
  • Find the biggest and the lowest number for even/odd;
  • Count the number of even/odd;
  • Check if the array It’s not empty;