WDV221 Intro Javascript

Final Exam Project

Array Handling

Arrays are used to store data, process data and to lookup data. Arrays can be loaded in your javascript and can be dynamically updated with your javascript as your page is processed. Make all changes to this page.

1. Create a array called productNames. It will have the following values: shoes, socks, sandals, shorts, shirts

2. Create a parallel array called productSales. It will have the following values: 170.50, 110.25, 3130.75, 125.50, 80;

3. Total Sales are: put results here!

4. Display Product sales form.

Product:

Product Sales:

Rubric: Points for 1. and 2.

  • 0 Not attempted.
  • 3 Attempted but not correct.
  • 5 Correctly written.

 

Rubric: Points for 3. and 4.

  • 0 Not attemped.
  • 2 Displays something.
  • 3 Displays correct values, but not formatted.
  • 4 Displays correct values, properly formatted.
  • 5 Works as expected with additional coding or effects.

Extra Credit:

Allow the user to type in the desired information instead of hardcoding them in the script. This could either the products or the sales amounts or both.