This example will display all the array element one by one after calling shift function. See the code snippet:
shift