This might be and most possibly has been asked before, ... How to take out the first item of an array after it has been iterated. Would like to always show the first 5 items of an array after clicking on a button, for that I thought it the easiest would be to break the loop after the index reaches 4, and for that reason I figured it would be easiest to take out those items of the array once they have been added to the page. I have tried using splice and shift, but didn't get to something that made sense. This is the code I have so far:This might be and most possibly has been asked