1. In the file function-declaration.js comment out past code and follow the video to create the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. In the file function-declaration.js comment out past code and follow the video to create the function calculateTax and return a value: Use the value 0.10 as the tax rate, i.e. 10% OST function calculateTax(amount) { let result = amount * 0.0825; return result; } let tax- calculateTax(100); console.log(tax); 2. Check your code runs and returns the correct outcome. Check you answer for $100 amount is $10 CST. 3. Take 2 screenshots of the final code and results: 1x showing all the code (readable)- name this image CODE Q3 (your first name) 1x showing the results of the code running - name this image RUN Q3 (your first name) Activity: Part 1 - Complete Revision Activity 5 Create the file function-declaration.js and follow the video to create the code and learn how to assign a variable to a function: 1. Create the function called sayHello JS function-declarations.js > sayHello function sayHello() { console.log('-- 1 2 3 4 5 10 6 } 7 console.log('hello'); console.log('- sayHello(); 2. Assign the variable "a" to the sayHello function. Note as you have already called the function (sayHello())- you will need to comment that call out to make the script run. Try leaving it not commented; then comment it to see the error code. -'); '); let a = sayHello; a(); 3. Add a variable "name" to the function to say hello to different names Amend the code used in the video to: 1. change the text in console log to say Hello from YOUR NAME to " instead of just "hello 2. change the names to pass in 3 friends names Check your code runs and returns the correct outcome. Activity: Part 2 - Personalise it 2. Amend the code used in the video to: change the text in console log to say Hello from YOUR NAME to " instead of just "hello" change the names to run to 3 friends names 2. Check your code runs and returns the correct outcome. 3. Take 2 screenshots of the final code and results: 1x showing all the code (readable) - name this image CODE Q2 (your first name) 1x showing the results of the code running - name this image RUN Q2 (your first name) 1. In the file function-declaration.js comment out past code and follow the video to create the function calculateTax and return a value: Use the value 0.10 as the tax rate, i.e. 10% OST function calculateTax(amount) { let result = amount * 0.0825; return result; } let tax- calculateTax(100); console.log(tax); 2. Check your code runs and returns the correct outcome. Check you answer for $100 amount is $10 CST. 3. Take 2 screenshots of the final code and results: 1x showing all the code (readable)- name this image CODE Q3 (your first name) 1x showing the results of the code running - name this image RUN Q3 (your first name) Activity: Part 1 - Complete Revision Activity 5 Create the file function-declaration.js and follow the video to create the code and learn how to assign a variable to a function: 1. Create the function called sayHello JS function-declarations.js > sayHello function sayHello() { console.log('-- 1 2 3 4 5 10 6 } 7 console.log('hello'); console.log('- sayHello(); 2. Assign the variable "a" to the sayHello function. Note as you have already called the function (sayHello())- you will need to comment that call out to make the script run. Try leaving it not commented; then comment it to see the error code. -'); '); let a = sayHello; a(); 3. Add a variable "name" to the function to say hello to different names Amend the code used in the video to: 1. change the text in console log to say Hello from YOUR NAME to " instead of just "hello 2. change the names to pass in 3 friends names Check your code runs and returns the correct outcome. Activity: Part 2 - Personalise it 2. Amend the code used in the video to: change the text in console log to say Hello from YOUR NAME to " instead of just "hello" change the names to run to 3 friends names 2. Check your code runs and returns the correct outcome. 3. Take 2 screenshots of the final code and results: 1x showing all the code (readable) - name this image CODE Q2 (your first name) 1x showing the results of the code running - name this image RUN Q2 (your first name)
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these computer network questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Can you give us a few Google AdWords Ad Extensions names that you know?
-
Choose a company and briefly describe its business and uniqueness in its industry. Now compare its management practices with the six principles described in Lecture 3. Is the company on the right...
-
(Debtor/Creditor Entries for Continuation of Troubled Debt) Daniel Perkins is the sole shareholder of Perkins Inc., which is currently under protection of the U.S. bankruptcy court. As a debtor in...
-
Outdoor Amenities is a manufacturer of backyard and deck furniture. Its products are in high demand, and it carries no inventory. Following is a list of selected account balances from its trial...
-
1. Does Red set clear performance standards for George? If he does, what are they? 2. Red and George are both jockeys who competed against each other in earlier races. Do these scenes show peer...
-
What is the profit under the "best case scenario? According to the scenario manager (output), what is the profit under the "most likely" scenario? According to the one variable DATA TABLE, what is...
-
Determine the internal normal force, shear force and bending moment at point C in the beam. 5 kN/m |C 3 m D 2 m- 2 m- 2 m F1-6
-
Big Company reported the following balances on its 1 2 / 3 1 / X 1 balance sheet: Capital Stock ( $ 1 par ) $ 1 0 0 , 0 0 0 Additional Paid in Capital $ 4 0 0 , 0 0 0 Preferred Stock ( 5 % ) $ 1 , 0...
-
What are the opportunities presented by climate change adaptation/emission mitigation policies for the supply-chain logistics sector? These could be specific laws, regulations, or other policy...
-
Denver Company had a fiscal year - end December 3 1 , 2 0 X 8 retained earnings account balance in its statement of financial position of $ 2 6 0 , 0 0 0 . During 2 0 X 8 , Denver Company had net...
-
6. What is the mass of 98 cm of water?
-
The company "Chanos Ltd " produces puzzles for adults within the framework of a standardized mass production. The production process uses 2 basic raw materials: cardboard and high quality ink. For...
-
The Finance Director has been asked to report to the board of Kesatria Bhd on the impairment review on the cash-generating unit. The situations are as follows: Situation 1 The company has suffered an...
-
What is the shape of the exponential distribution?
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-7. Ivan sold the following securities during the year and received a Form 1099-B that...
-
Brian and Kim have a 12-year-old child, Stan. For 2012, Brian and Kim have taxable income of $52,000, and Stan has nonqualifying dividend income of $4,500 and investment expenses of $250. No election...
-
Jerry made the following contributions during 2012: His synagogue (by check).....................................................$680 The Democratic Party (by check)...
-
What connection did Newton make between a falling apple and the Moon?
-
How was Pioneer 10 able to escape the solar system with an initial speed less than escape speed?
-
If you stood atop a super-tall ladder three times as far from Earths center as at Earths surface, how would your weight compare with it present value?
Study smarter with the SolutionInn App