0

Can someone help me with the following code

I am trying to calculate salaryIncrease from the given percentage as input.. Please help where I went wrong function main() { var percent = parseInt(readLine(),10); console.log(salaryIncrease(percent)); } var salaries = [3000, 7000, 5000, 15000]; const salaryIncrease = percent => { //your code goes here salaries.forEach(percent =>{ let salaryIncrease = salaries * percent; }); }

19th Dec 2020, 7:32 PM
Krishneel Sharma
Krishneel Sharma - avatar
3 Respuestas
0
salaryIncrease function not return anything?!
19th Dec 2020, 9:12 PM
george
george - avatar
0
could you please write the output you want to get?!
19th Dec 2020, 9:14 PM
george
george - avatar
0
var sum = 0; salaries.forEach(salary => sum += salary * percent / 100.0); return sum;
19th Dec 2020, 10:39 PM
JaScript
JaScript - avatar