+ 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 Answers
+ 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. š