Exercise 5: Retrieve and Recombine Elements of an Array

Make a new array out of an existing one by combining certain elements of the array.

We'll cover the following

Problem statement

You’re given the following array:

array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Make a new array with the following output:

result = [2, 4, 6]

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy