Can someone please help me with the answer to the 44th code project, store manager in the JavaScript lesson? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone please help me with the answer to the 44th code project, store manager in the JavaScript lesson?

Ive bee trying for a while now. I really need help. The answer should be in JS4 please.

4th Sep 2021, 8:10 PM
Moses Uga
Moses Uga - avatar
5 Answers
+ 1
Moses Uga function main() { var increase = parseInt(readLine(), 10); var prices = [98.99, 15.2, 20, 1026]; for (i=0; i<4; i++){ prices[i]+=increase } console.log(prices) }
4th Sep 2021, 8:21 PM
Abhay
Abhay - avatar
+ 1
Abhay Thank u
4th Sep 2021, 8:23 PM
Moses Uga
Moses Uga - avatar
0
Can you shows us the code you have written so far ?
4th Sep 2021, 8:15 PM
Abhay
Abhay - avatar
0
Abhay here: function main() { var increase = parseInt(readLine(), 10); var prices = [98.99, 15.2, 20, 1026]; for (i=0; i<4; i++){ y = prices[i] + increase arr = [y] console.log(arr) } }
4th Sep 2021, 8:17 PM
Moses Uga
Moses Uga - avatar
0
for (x = 0; x < prices.length; x++) { prices[x] += increase; } console.log(prices);
9th Oct 2021, 2:39 PM
Ben
Ben - avatar