Question: I need you to write the code for me please and follow the instructions. thank you this is and ink all I need you to


I need you to write the code for me please and follow the instructions. thank you

this is and ink
all I need you to do is to write the code for me and I also Include what I started already so please just follow the instructions on the papers. thank you. just write the code that's all
Create a JavaScript file (link it to an HTML file), and write code for below 3 tasks: A1. Lucas is still building his tip calculator, using the same rules as before: Tip 15% of the bill if the bill value is between 50 and 300, and if the value is different, the tip is 20 %. 1. Write a function 'calcTip' that takes any bill value as an input and returns the corresponding tip, calculated based on the rules above you can check out the code from first tip calculator challenge if you need to).Use the function type you like the most.Test the function using a bill value of 100. 2. And now let's use arrays! So create an array 'bills' containing the test data below. 3. Create an array 'tips' containing the tip value for each bill, calculated from the function you created before. 4. BONUS: Create an array 'total' containing the total values, so the bill + tip. TEST DATA: 125, 555 and 44 A2. Finish' writing getSummary function; Print the result of getSummary to the console by calling this method (function). B. Let's go back to Lucas and John comparing their BMIs! This time, let's use objects to implement the calculations! Remember: BMI = mass / height ** 2 = mass/ (height * height). (mass in kg and height in meter) 1. For each of them, create an object with properties for their full name, mass, and height(Lucas Miller and John Smith) 2. Create a 'calcBMI' method on each object to calculate the BMI(the same method on both objects).Store the BMI value to a property, and also return it from the method. 3. Log to the console who has the higher BMI, together with the full name and the respective BMI.Example: "John Smith's BMI (28.3) is higher than Lucas Miller's (23.9)!" TEST DATA: Lucas weights 78 kg and is 1.69 m tall. John weights 92 kg and is 1.95 m tall. C. Let's improve the tip calculator even more, this time using loops! 1. Create an array 'bills' containing all 10 test bill values 2. Create empty arrays for the tips and the totals ('tips' and 'totals') 3. Use the 'calcTip' function we wrote before (no nee to repeat) to calculate tips and total values(bill + tip) for every bill value in the bills array. Use a for loop to perform the 10 calculations! TEST DATA: 22,295, 176, 440, 37, 105, 10, 1100, 86 and 52 const john { firstName: 'John', lastName: 'Willams', birthYear: 1996, job: 'student', friends: [ 'Mike', 'Jack', 'Peter'), calAge: function () { this.age = 2021 this.birthYear; return this.age 7/Unfinished getSummary: function () { return is a years old, and he has ao driver's license
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
