While javascript foreach is powerful, it’s easy to misuse if you're not careful. This post highlights frequent errors, such as mismanaging asynchronous callbacks or modifying arrays during iteration, and shows how to avoid them for more reliable scripts. https://docs.vultr.com/javascript/standard-library/Array/forEach