The power of javascript foreach lies in its callback function. This post explains how callbacks work, how to access index and array values, and how to avoid common callback-related mistakes when iterating through arrays. https://docs.vultr.com/javascript/standard-library/Array/forEach