+ 1
âSpend After Savingâ: Function Parameters
https://code.sololearn.com/cfRYCYS4h2pG/?ref=app Iâve tried numerous ways, but havenât figured this one out. Functions 25.3. Please help!
4 RĂ©ponses
+ 7
//try this
function main() {
let salary= parseInt(readLine(), 10);
// complete the function call
getSavings(salary)
}
//complete the function
function getSavings(salary) {
save= salary * .15;
console.log(save)
}
+ 6
Everything should work. You could just try them.
All you need a variable to assign a value(salary*.15)
Here, you just missed console.log() to print the output.
+ 2
Simba Unbelievable. Why did âsaveâ work and not (salary) or getSavings?
Also, thanks a million for this.
+ 2
Ok. Thanks again Simba . Thatâs very helpful. đ