Question: Mod 4 Assignment For this assignment you will create a program that prompts the user if they want to use even, odd or both (odd
Mod 4 Assignment
For this assignment you will create a program that prompts the user if they want to use even, odd or both (odd and
even) numbers. Depending on their choice, you will add the even, odd or all the numbers between one and 20 together
and print to the web page, their choice and the result.
1. Create a new web HTML page named mod4
2. Add a title More JavaScript.
3. Reference the stylesheet you created previously.
4. Add at least four comments to your JavaScript code.
5. Using JavaScript
a. Add a heading 1 More JavaScript to the page.
b. Add your variables.
c. Prompt user for input 1 for odd 2 for even and 3 for both.
d. Using switch multiple-selection statements enter code for adding together odd numbers, even numbers
or all numbers between 1 and 20 using a for loop.
e. Print to the web page, the users choice and the answer with
tags.
f. Print an Invalid choice statement to the document if user entered incorrect information within
tags.
6. Using HTML
a. Add a horizontal rule to the web page
b. Add links to your other pages.
7. Add a link to this page on your other pages
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
