Use for() instead Array.forEach(), for() is 95% faster

Array.ForEach is about 95% slower than for() in for each for Arrays in JavaScript.

So, don’t use:

Use:

See this performance test online: http://jsperf.com/fast-array-foreach

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
DMCA.com Protection Status
0
Would love your thoughts, please comment.x
()
x