Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Adjusting Salary with a Bonus | Section
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
JavaScript Essentials for Beginners - 1768407374405

bookChallenge: Adjusting Salary with a Bonus

Tehtävä

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

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 24
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

bookChallenge: Adjusting Salary with a Bonus

Pyyhkäise näyttääksesi valikon

Tehtävä

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

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 24
single

single

some-alt