Question: javascript The appFunc code should then repeatedly call the parameter function on each element in the array, storing the result back into the array at

javascript

The appFunc code should then repeatedly call the parameter function on each element in the array, storing the result back into the array at the same point. Write a function called appFunc that receives an array (arr) and a function (func) as a parameter. appendArray that receives two arrays (arr1 and arr2). The function should use a loop append all the elements of arr2 on the end of arr1. no methods of Array class that will perform the operation for you in one step

function sq(ele) {

return ele * ele;

}

var arr = [1, 2, 3, 4];

appFunc(arr, sq);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!