Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Lesson 10

ID: 3744696 • Letter: L

Question

The webpage BrokeCode.html won't run. See if you can find the error.

1. Document the steps you tried to find the problem based on any troubleshooting procedures.

2. Document the problem and the solution.

3. Attach the corrected document.

<!DOCTYPE html>
<html>
<head>
<title>Lesson 10</title>
<script type="text/javascript">
   function addNumb(fname,lname){
       x=fname+lname
       return x;
   }
   function showname(fname,lname){
   alert("funrun");
       document.write("<h2>Your first name is: +fname+"</h2>");
       document.write("<h2>Your last name is: +lname+ "</h2>");
   }
  

</script>
</head>
<body>

Explanation / Answer

1) / should be escaped with one more / 2) closing " missing for string in document.write Fixed code: ------------ Lesson 10 function addNumb(fname,lname){ x=fname+lname return x; } function showname(fname,lname){ alert("funrun"); document.write("

Your first name is: "+fname+""); document.write("

Your last name is: "+lname+ ""); } showname("Cristiano", "Ronaldo");

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote