Question: What is wrong with the following segment of JavaScript (besides the missing html, body and script tags - I can not type those as they

What is wrong with the following segment of JavaScript (besides the missing html, body and script tags - I can not type those as they interfere with the Blackboard html code)? The way the code appears below, the loop will never be executed and the line of code with the prompt statement in it never appears for the user to respond to.

var BR = "
"; // html line break tag var ES = ""; // empty string

var reply; while ( reply == "Y" ) { document.write("Hello" + BR); reply = prompt("Do you want to print hello again?",ES); }

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!