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

Sveip for å vise menyen

book
Challenge: Making a Salary Calculator

Oppgave

Swipe to start coding

You are assigned a task for making a salary calculator. The company has a fixed hourly pay for all the employees. The salary is calculated by multiplying the number of hours worked with the fixed hourly pay.

  • Declare & initialize a constant called hourly_rate with a value of 25.00.
  • Declare & initialize a variable called hoursWorked with a value of 164.
  • Declare a variable called totalPay and set it equal to the product of hoursWorked and hourly_rate.
  • Use a console.log line to output the following message: The calculated total payment is: X, where X should be the calculated totalPay.

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 9
Vi beklager at noe gikk galt. Hva skjedde?

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: Making a Salary Calculator

Oppgave

Swipe to start coding

You are assigned a task for making a salary calculator. The company has a fixed hourly pay for all the employees. The salary is calculated by multiplying the number of hours worked with the fixed hourly pay.

  • Declare & initialize a constant called hourly_rate with a value of 25.00.
  • Declare & initialize a variable called hoursWorked with a value of 164.
  • Declare a variable called totalPay and set it equal to the product of hoursWorked and hourly_rate.
  • Use a console.log line to output the following message: The calculated total payment is: X, where X should be the calculated totalPay.

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 9
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