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

Sveip for å vise menyen

book
Challenge: Adjusting Salary with a Bonus

Oppgave

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 desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 2. Kapittel 10

Spør AI

expand
ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

book
Challenge: Adjusting Salary with a Bonus

Oppgave

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 desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 2. Kapittel 10
Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Vi beklager at noe gikk galt. Hva skjedde?
some-alt