Array Pattern: One At A Time

Printing everything in an array

DIRECTIONS:

The goal is for you to see another example of a while loop, in which the robot keeps moving until it's standing in front of a wall

The code should set up a 'click event handler' using jQuery. Within the event handler, the program should create an array and clear the output element (which is a paragraph with the id of printAllOutput). The program should then go through all the elements of the array, adding each element of the array to the end of output element.

NOTE: You may want to look up the jQuery method named append(), either in the official jQuery documentation or in the W3Schools site.