Is there a way to access the next element in an array while iterating through it?
for (let item of list) {
// accessing the item at index + 1
}
Although I am aware that I could use a traditional for loop, I would rather stick with this syntax.
for (i = 0; i < list.length; i++) {}