Question: Write a Javascript program that Allows the user to buy Pos toys as listed on the page.The page should include parallel arrays (at least two).One

Write a Javascript program that Allows the user to buy Pos toys as listed on the page.The page should include parallel arrays (at least two).One array (RichardItem) holds the names of the toys. (-7 points if no array)

var RichardItem = new Array ("Po action figure", "Master Shifu action figure", "Lord Shen action figure");

One array (RichardPrice) holds the corresponding prices for each toy.

var RichardPrice = new Array(7, 6, 5); (-7 points if no array)

Retrieve values from the parallel arrays, display the toys names/prices as shown (hint: onload). (4 points)

The user should be prompted to select a toy and a quantity. (4 points)

The page will display the total cost for that quantity of the toy chosen (by using the values from the parallel arrays). (6 points)

Webpage program should follow examples below

Initial page

Write a Javascript program that Allows the user to buy Pos toys Example INPUT

as listed on the page.The page should include parallel arrays (at least

two).One array (RichardItem) holds the names of the toys. (-7 points if

no array) var RichardItem = new Array ("Po action figure", "Master Shifu

action figure", "Lord Shen action figure"); One array (RichardPrice) holds the corresponding

prices for each toy. var RichardPrice = new Array(7, 6, 5); (-7

points if no array) Retrieve values from the parallel arrays, display the

OUTPUT

toys names/prices as shown (hint: onload). (4 points) The user should be

Richard Ricardo's Kung Fu Panda Po Toy Sale Three parallel arrays will hold an toy item's name, price, and identifier. The user will make the purchase. The program will calculate the total cost. Begin Purchase 1. Po action figure 7 2. Master Shifu action figure 6 3. Lord Shen action figure 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!