Question: Question 26 JavaScript Question Assure you have been asked to implementa simple JavaScript memory one of size 2x 2 use the follow HTML code. When
Question 26 JavaScript Question Assure you have been asked to implementa simple JavaScript memory one of size 2x 2 use the follow HTML code. When the user ces on any Question mark picture, your code should reveal the hidden one. The revealed picture should be vesible unt the user click on another Question mark picture, if both pictures are the same, then it should be kept while otherwise, both pictures should be replaced by questions mark pictures. Implement showPico function with any necessary global variables that hari the above requirements. If the user revealed all the pictures successfully change the message Keep Trying to You WON. Assume the following: - you have a global array storing two pairs of pictures as follows: var pics-p1.pngspf.png: p2 jog: p2.jpg each index in the array is associated with the HTML Images objects, L.e. pics[2] refer to the third image (Images[2] in the webpage - Note that q.png is the picture with Question Mark. Question 26 JavaScript Question Assure you have been asked to implementa simple JavaScript memory one of size 2x 2 use the follow HTML code. When the user ces on any Question mark picture, your code should reveal the hidden one. The revealed picture should be vesible unt the user click on another Question mark picture, if both pictures are the same, then it should be kept while otherwise, both pictures should be replaced by questions mark pictures. Implement showPico function with any necessary global variables that hari the above requirements. If the user revealed all the pictures successfully change the message Keep Trying to You WON. Assume the following: - you have a global array storing two pairs of pictures as follows: var pics-p1.pngspf.png: p2 jog: p2.jpg each index in the array is associated with the HTML Images objects, L.e. pics[2] refer to the third image (Images[2] in the webpage - Note that q.png is the picture with Question Mark
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
