Answer to Question #278886 in HTML/JavaScript Web Application for Lovely

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


1
Expert's answer
2021-12-13T00:03:13-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS