Is JavaScript forEach slower than for loops even in Mozilla Rhino?

31 views Asked by At

I use Servoy Developer at work, and it uses Mozilla Rhino which is a JavaScript engine written in Java. Will how forEach is implemented into Java make a difference in if I should use for loops over forEach?

I’ve read that JavaScript forEach is slower than just using a for loop, since it makes a function call for each element.

0

There are 0 answers