2 ms·
the forEach is running a function on each node, passing the node as a parameter and console.logging that node. the for of is a loop. at any rate it seems the
by bryanrasmussen 9y ago
the forEach is running a function on each node, passing the node as a parameter and console.logging that node.
the for of is a loop.
at any rate it seems the kind of difference in legibility that would vanish with very little familiarity, I would expect for most people developing JavaScript regularly that forEach would be more legible - even with the arrow function - because it is the construct they encounter and use more often day to day.