Answered step by step
Verified Expert Solution
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 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started