what is wrong this code????  JAVASCRIPT when I open it in my browser, the input box does not come up

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

what is wrong this code????  JAVASCRIPT when I open it in my browser, the input box does not come up 

 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Class HW </title>
<style type="text/css">
body p {
    font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-align: center;
    color: #2E0BF1;
    font-size: 16px;
}         
body p {
}
body {
    background-color: #888888;
}
</style>
</head>
<body>
<h1 style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; text-align: center;"> Introduction to JavaScript </h1>
<p> Homework #4  Part V.<strong> | </strong>Jen Sawvelle</p>
<p><img src="../runpic.jpg" width="400" height="200" alt=""/></p> 
<script language="JavaScript" type="text/JavaScript">

var Name = "Who"; 
var Laps = 5;
               /*Values of theses variables will be stored in the program. */
               while (Laps > 0) //Finite loop using while stmnt
            {
                                   
Name = prompt("Type the name of the runner: ");
                                           
Laps = prompt("Type number of laps to run: ");
            document.write("I (" + Name + "),am going to run " + Laps + " laps! <br>");        
            if ((Laps >=1) && (Laps <= 10))

            {
                        // Action statements to run around the track Laps times
                        for (lapCount = 1; lapCount <= Laps; lapCount++)
                        {
                                    document.write(“Running lap “ + lapCount + “<br>”);
                        }  // end of for loop
                        document.write(“I am a winner! <br>”);  // Happy runner
            }
            else if (Laps != 0)  // case for Laps greater than 10 or negative
            {          // Action for false: Display to user to type a lap count between 1 and 10
                        document.write(“Invalid laps to run. <br>”);
document.write(“Type a number between 1 and 10 inclusive. <br>”);
            }
else
{          // Laps is zero case. 
// While loop will terminate and program will stop.
document.write(“Lap count is zero. Program will stop. <br>”);
}  // end of if statement
 
    document.write(“We did it!  We did it!! <br>”);   // group rejoice
             
            }//end of for loop. 
                
                                             } //end of while loop. 

  </script>
</body>
</html>

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education