Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What's wrong with the following code? Title function average () { document.getElementById(numberA).value b = document.getElementById(numberB).value alert((a + b) / 2); a = Find average You
What's wrong with the following code? Title You should replace both occurrences of .value with .innerHTML None of the other choices are correct. O The first line of the function should be function average(a, b) { You should be using prompt instead of getting values from text fields. You're not adding numbers. Instead, you're pasting strings one after another. The body tag is missing an onload attribute. You need an if statement in order to compute the average
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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