DEV Community

Discussion on: How many ways iterate the objects and arrays in javascript?

Collapse
 
lexlohr profile image
Alex Lohr

I didn't explain much, just wrote down the first few I could think of. I didn't even say why you should avoid recursion (you might overflow the call stack).

Thread Thread
 
qm3ster profile image
Mihail Malo

I'd be more wary of someone that does #5 :)
Or 2 or 3 for side effects.