Question: IN JAVA SCRIPT write code in the function below to return an array filled with numbers ordered consecutively from 1, up to and including, the
IN JAVA SCRIPT
write code in the function below to return an array filled with numbers ordered consecutively from 1, up to and including, the value of the parameter (numElements).
Attempting to use a do- loop
@param {number} numElements number of elements to be stored in the array
@return {number[]} an array which contains numbers from 1 to numElements in order.
function doLoop(numElements) {
//code should return arrToProcess
return arrToProcess;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
