Challenge: Making a Salary Calculator
Tarea
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_RATEwith a value of25.00. - Declare & initialize a variable called
hoursWorkedwith a value of164. - Declare a variable called
totalPayand set it equal to the product ofhoursWorkedandHOURLY_RATE. - Use a
console.logline to output the following message:The calculated total payment is: X, whereXshould be the calculatedtotalPay.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 23
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Genial!
Completion tasa mejorada a 1.33
Challenge: Making a Salary Calculator
Desliza para mostrar el menú
Tarea
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_RATEwith a value of25.00. - Declare & initialize a variable called
hoursWorkedwith a value of164. - Declare a variable called
totalPayand set it equal to the product ofhoursWorkedandHOURLY_RATE. - Use a
console.logline to output the following message:The calculated total payment is: X, whereXshould be the calculatedtotalPay.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 23
single