Client Login Register
Calculate Price & Order →
← Back to all articles

Javascript Quote Generator Assignment

Published on December 02, 2026 • Category: Academic
Javascript Quote Generator Assignment

Javascript Quote Generator Assignment

Objective: Create a Web page that prompts the user for information, stores it in an array, performs a math operation, and writes the information out on the page.

Requirements:

  • Create a web page named lab2.html. You can format the page any way that you like. Give the page a title and heading.
  • Create an array with 5 quotes of the day.
  • Prompt the user to enter a number. Divide the number by 5 and get the remainder (modulus). Use the remainder as the array index and write that quote to the page.
  • Create an array of 3 favorite website urls and write them out on the web page as working links.
  • Prompt the user to enter their favorite website. Add it as the last item in the favorite websites array.
  • Delete the first website from the array.
  • Write out the revised array to the page.
  • Add comments to your code.
  • Upload your files to the server.

I have provided 2 examples below that demonstrate the techniques required for this lab – although they do not meet the specific requirements as outlined.

Lab Requirement

Point Value

Create a Web page named Lab2.html. You can format the page any way that you like

5 points

Create 2 arrays: 5 quotes in one, 3 website urls in the other one10 points
Prompt the user for a number, divide by 5 and use the modulus to write out the quote of the day.15 points

Write out the website urls as links on the page.

10 points

Prompt the user to enter their favorite website url and add it to the end of the array

10 points

Delete the first website from the array and write out the revised array

10 points

Add comments to your code

10 points

Upload to the server and submit the assignment

5 points

Total:

75 points

17




Share

We only email you; unsubscribe in one click. No address is ever sold.

Ask about study support 💬 WhatsApp 📞

Just now