Challenge: Remove Even Integers From an Array

Given an array of size n, remove all even integers from it. Implement this solution in JavaScript and see if it runs without an error.

Problem Statement

Implement a function removeEven(arr), which takes an array arr in its input and removes all the even elements from a given array.

Input

An array with random integers.

Output

An array with only odd integers

Sample Input

[1,2,4,5,10,6,3]

Sample Output

[1,5,3]

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.