Javascript – Can I decrease an array index by 1 and loop back to the end in a single line?
Lets say that I'm manually adjusting the index of an array in JavaScript. I have a function that will increase the index and another that will decrease it. I want these functions to loop (so increasing the index when already…