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; }); }
3 Respuestas
0
salaryIncrease function not return anything?!
0
could you please write the output you want to get?!
0
var sum = 0;
salaries.forEach(salary => sum += salary * percent / 100.0);
return sum;