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.


An array with random integers.


An array with only odd integers

Sample Input


Sample Output


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