const directions = ["North", "West", "South", "East"];
I want directions.next(); to cycle through them in order. How do I accomplish that in the latest iteration of the ECMAScript? I want every function that calls for directions to get what .next() established to be next.
Does it need to be its own mini-data structure?
Here's what I want to accomplish:
`["Jason Bourne", "Foma Kinaev", "John Michael Kane"]`.next() # // Jason Bourne
`["Jason Bourne", "Foma Kinaev", "John Michael Kane"]`.next() # // Foma Kinaev
`["Jason Bourne", "Foma Kinaev", "John Michael Kane"]`.next() # // John Michael Kane
`["Jason Bourne", "Foma Kinaev", "John Michael Kane"]`.next() # // Jason Bourne