Question #278886

Series of Operations


Given an array myArray of numbers, write a JS program to perform the following steps and log the result.


1. Multiply each value with 9.


2. Subtract 20 from each value.


3. Multiply each value with 7.


4. Log the values of the resulting array separated by a


Expert's answer

let arr = [];
for (let i = 0; i < arr.length; i++) {
   arr[i] *= 9;
   arr[i] -= 20;
   arr[i] *= 7;
   console.log(arr[i]);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS