In Python, you can do the following:
>>> foo = ["some", "random", "list", "foo"]
>>> for a, b, c in zip(foo, foo[1:], foo[2:]):
... print(f"{a} {b} {c}")
...
some random list
random list foo
How can I do the same thing in Javascript without having to use a positional index in the loop? Or is that the idiomatic way?