Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Attached is what is submitted for my java script class. But my teacher wants me to resubmit because of the following problem: * move myFunction()
Attached is what is submitted for my java script class.
But my teacher wants me to resubmit because of the following problem:
* move myFunction() to script.js files
* rename myFunction() to reflect what function does
* update per 10/3/22 additional notes in the assignment description
* output the results, the odd numbers between first and the second number and their sum using alert window
* call function on clicking submit button
Please help me to fix the problems.
Q https://replit.com/@F22-CS112-ONLINE-GRIGORIANTS/Lab-6-NiloufarVahid Ramezani#index.html index.html + lab #6 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 function myFunction() { let firstNum = document.getElementById("firstNum").value; let secondNum = document.getElementById("secondNum").value; if(isNaN(firstNum) || isNaN(second Num) ) { } alert("Input must be numbers"); document.getElementById("output").innerHTML = ""; else if(firstNum>second Num) { } alert("First Number cannot be greater than second number"); document.getElementById("output").innerHTML = ""; else{ let sum = 0; for (let i firstNum; i
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