Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the code below, you will find 5 errors. Clearly identify each error and how you resolve each error. (1 point per error) var

  

In the code below, you will find 5 errors. Clearly identify each error and how you resolve each error. (1 point per error) var names = ["Ben", "Joel", 8 17 18 19 1234567 % 20-2345678907232 21 var scores = [88, 98 77, 88]%;B var $ = function (id) { }; "Judy", "Anne"]; return document.getElementById(id); Evar addScore = function () { 10 11 12 13 14 } 15 16 // get user entries var name = $("name").value; var score = parseInt( $("score").value )%;B // check entries for validity "1" if (name == ||isNaN(score) || score < 0 || score > 100) { alert("You must enter a name and a valid score"); 25 }; else names[names.length] = name; scores [names.length] = score; $("name").value = $("score").value = "" $("scores_display").value = $("name").focus;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

The correct code is given below var names Ben Joel Judy Anne var scores 88 98 77 88 ... 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

Corporate Finance

Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe

10th edition

978-0077511388, 78034779, 9780077511340, 77511387, 9780078034770, 77511344, 978-0077861759

More Books

Students also viewed these Programming questions