Question 1 of 30
In a software application, you are tasked with implementing a function that takes an array of numbers and a callback function as parameters. The goal is to create a new array that contains the results of applying the callback function to each element of the original array. If the callback function is designed to double the value of each number, what will be the output of the function when applied to the array [1, 2, 3, 4]?
[2, 4, 6, 8]
[1, 2, 3, 4]
[1, 4, 9, 16]
[0, 0, 0, 0]

Preparing for SalesForce Certified JavaScript Developer I Certified JavaScript Developer I? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free