Easy there, pal!
To access the Functions challenges in the JavaScript programming, you need to sign up first.
The boss liked the mile calculator and this is why he entrusted you with automating what he values the most: his accounting!
He needs to hire a few new employees, since local idlers no longer suffice. The accounting department has allocated a budget for salaries, but it includes taxes, and in job advertisements, salary should be indicated without taxes. Anyway, here is the technical assignment:
Meow! I need a program that will use the gross salary (salary before tax) to calculate an approximate take-home salary (that is given out).
Write a
calculateSalaryfunction with one parameter: the gross salary amount. The function must return the take-home salary.I do not need great accuracy. Just take into account that 35% of the gross salary amount goes to taxes, and if the gross salary is greater than or equal to 100 thousand, then the tax rate is 45%.
Depending on how you calculate, the final result may have a fractional part. You can use Math.round to round the calculation results.
This program will be tested by Muffin himself. He’ll call your function (you’re going to write the function, right?) with different arguments and will check the result. To call the boss to check the program, press the Hey boss, here’s your program! button located in the console.
You’ve gone to a different page
Click inside the mini-browser to shift the focus onto this window.
To access the Functions challenges in the JavaScript programming, you need to sign up first.
Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.
Forgot to connect your email to the profile? Email us and we’ll help.