This is essentially how you emulate the way Python's
forEach() and even
filter() — take up to three arguments (element, index, array) while they iterate through the array.
element is the element that the iterator points to at each step,
index is the index of this item in the original array. And it's worth noting the third argument is the original array. ⋯