Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Adjusting Salary with a Bonus | Manipulating Data
Introduction to JavaScript

Swipe to show menu

book
Challenge: Adjusting Salary with a Bonus

Task

Swipe to start coding

Your company has decided to reward employees with a performance bonus of 250%. You need to update the salary calculator to include this bonus in the final salary calculation.

Extend the program by doing the following:

  • Declare a new constant called bonus with a value of 2.5.
  • Before showing the output, multiply the value of totalPay with bonus and store the result back in totalPay. (Use the shorter syntax for this arithmetic operation).

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 10

Ask AI

expand
ChatGPT

Ask anything or try one of the suggested questions to begin our chat

book
Challenge: Adjusting Salary with a Bonus

Task

Swipe to start coding

Your company has decided to reward employees with a performance bonus of 250%. You need to update the salary calculator to include this bonus in the final salary calculation.

Extend the program by doing the following:

  • Declare a new constant called bonus with a value of 2.5.
  • Before showing the output, multiply the value of totalPay with bonus and store the result back in totalPay. (Use the shorter syntax for this arithmetic operation).

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 10
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt