Question: I need you to write all the code for me and follow the instructions thank you. Create a JavaScript file (link it to an HTML

 I need you to write all the code for me and

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

Create a JavaScript file (link it to an HTML file), and write code for below 3 tasks: A. Apply switch statement, print out 'coffee + bagel + Sandwich' if meal is breakfast or lunch; print out 'pasta' if meal is dinner, otherwise print 'no food B1: Improve the microwave function which take arguments of food weight time and mode, and display a message of the food weight and time needed for 4 persons under the mode. HINT: Create two more functions (for calculating food weight/ time for 4 persons) inside microwave function, and consider the case when user passes invalid input. B2: Jason wants to build a very simple tip calculator for whenever he goes eating in a restaurant. In his country, it's usual to tip 15% if the bill value is between 30 and 300. If the value is different, the tip is 20%. 1. Your task is to calculate the tip, depending on the bill value. Create a variable called 'tip' for this. Try not to use an if/else statement. 2. Print a string to the console containing the bill value, the tip, and the final value (bill + tip). Example: 'The bill was 275, the tip was 41.25, and the total value 316.25 * TEST DATA: Test for bill values 275, 28 and 430 C. Back to the two teams game! There is a new discipline, which works differently. Each team competes 3 times, and then the average of the 3 scores is calculated (so one average score per team). A team ONLY wins if it has at least DOUBLE the average score of the other team. Otherwise, no team wins! 1. Create an arrow function 'calcAverage' to calculate the average of 3 scores 2. Use the function to calculate the average for both teams 3. Create a function 'checkWinner' that takes the average score of each team as parameters ('avgNets' and 'avgKnicks"), and then logs the winner to the console, together with the victory points, according to the rule above. Example: "Knicks win (30 vs. 13)". 4. Use the 'checkWinner' function to determine the winner for both DATA 1 and DATA 2. 5. Ignore draws this time. TEST DATA 1: Nets score 44, 23 and 71. Knicks score 65, 54 and 49 TEST DATA 2: Nets score 85, 54 and 41. Knicks score 23, 34 and 27 D (Optional) Create a function called celsiusToFahrenheit 1. Store a celsius temperature into a variable. Convert it to fahrenheit and output "NN"C is NN"F". Create a function called fahrenheitToCelsius; 2. Store a fahrenheit temperature into a variable. Convert it to celsius and output "NN"F is NN"C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!