Array.push

Array.push(ELEMENT1, ... , ELEMENTN)

This function adds an item to the end of an array. You can hand in multiple items if you like, but at least one is required. The length of the array is automatically increased as a result of calling push.

This example program prompts you for the names of your friends, and adds those to an array using push.