Course Content
Introduction to JavaScript
Introduction to JavaScript
1. Getting Started
Hello WorldTask - Show some OutputTask - Output Multiple LinesNumbersTask - Working with NumbersTask - Calculate the Speed of a CarTask - Calculate Area of a TrapeziumOutputting Multiple ValuesTask - Meaningful OutputCommentsTask - Adding a commentMulti-Line CommentsTask - Commenting out CodeTask - Coffee Shop SalesWhat is JavaScript anyway?
2. Manipulating Data
Storing DataTask - Declaring a VariableTask - Accessing Data From a VariableTask - Fixing Variable NamesTask - Reassigning a VariableConstantsTask - Declaring & Using ConstantsPerforming Arithmetic On VariablesTask - Making a Salary CalculatorTask - Adjusting Salary with a BonusTypes of DataTask - Declare a Boolean ValueHow different Data Types InteractTask - Concatenating StringsTask - User Profile & Activity Details
3. Conditional Statements
Task - Making a Salary Calculator
Task
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 of25.00
; - Declare & initialize a variable called
hoursWorked
with a value of164
; - Declare a variable called
totalPay
and set it equal to the product ofhoursWorked
andHOURLY_RATE
. - Use a
console.log
line to output the following message:The calculated total payment is: X
, whereX
should be the calculatedtotalPay
.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 9
Task - Making a Salary Calculator
Task
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 of25.00
; - Declare & initialize a variable called
hoursWorked
with a value of164
; - Declare a variable called
totalPay
and set it equal to the product ofhoursWorked
andHOURLY_RATE
. - Use a
console.log
line to output the following message:The calculated total payment is: X
, whereX
should be the calculatedtotalPay
.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 9