Question: URGENT~! What is wrong with the following segment of JavaScript code ( besides missing script tags - I can not enter them as they get

URGENT~!

What is wrong with the following segment of JavaScript code ( besides missing script tags - I can not enter them as they get confused with Blackboard code)?

var quart = 2; // # of quarters in a half of a year var BR = "
"; // html line break tag var ES = ""; // empty string

var saleQuart1;

var saleQuart2;

var totSale;

var avgSale;

saleQuart1 = prompt("Enter the Sales Figures for the First Quarter:",ES); saleQuart2 = prompt("Enter the Sales Figures for the Second Quarter:",ES); // Calculate total sales and average for 2 quarters totSale = saleQuart1 + saleQuart2 ; avgSale = totSale / quart;

// Display results document.write("Average for 2 quarters: " + avgSale + BR);

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!