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 - Adjusting Salary with a Bonus
Task
Swipe to start coding
Your company has decided to reward employees with a performance bonus of 2.5%. You need to update the salary calculator to include this bonus in the final salary calculation.
Your task is to extend the program by doing the following:
- Declare a new constant called
BONUS
with a value of2.5
; - Before showing the output, multiply the value of
totalPay
withBONUS
and store the result back intotalPay
. (Use the shorter syntax for this arithmetic operation);
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 10
Task - Adjusting Salary with a Bonus
Task
Swipe to start coding
Your company has decided to reward employees with a performance bonus of 2.5%. You need to update the salary calculator to include this bonus in the final salary calculation.
Your task is to extend the program by doing the following:
- Declare a new constant called
BONUS
with a value of2.5
; - Before showing the output, multiply the value of
totalPay
withBONUS
and store the result back intotalPay
. (Use the shorter syntax for this arithmetic operation);
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 10