Historically the forEach-loop in JavaScript has been significant slower than for-loop. I don't know if this still applies, but I never use it in JavaScript for that reason.
In PHP I most often use foreach() as it gives me a nice clean code without all the [array brackets], etc.