Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

How does the EEOC define sexual harassment?

Answered: 1 week ago

Question

Dhe Dhe

Answered: 1 week ago

Question

Advance warning and an explanation for the layoff.

Answered: 1 week ago

Question

Assessment of skills and interests.

Answered: 1 week ago