Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Task - Making a Salary Calculator | Manipulating Data
Introduction to JavaScript
course content

Зміст курсу

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
2. Manipulating Data
3. Conditional Statements

book
Task - Making a Salary Calculator

Завдання

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.

Your task is to:

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

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 9
toggle bottom row

book
Task - Making a Salary Calculator

Завдання

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.

Your task is to:

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

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 9
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Ми дуже хвилюємося, що щось пішло не так. Що трапилося?
some-alt