Note: this implementation is faster than calling into JS native forEach.
forEach
Similar to the native two-argument version of forEach