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

Svep för att visa menyn

book
Challenge: Adjusting Salary with a Bonus

Uppgift

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).

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 10
Vi beklagar att något gick fel. Vad hände?

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

book
Challenge: Adjusting Salary with a Bonus

Uppgift

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).

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 10
Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Vi beklagar att något gick fel. Vad hände?
some-alt