You put emphasis on the fact that map, filter and reduce go through every single element of the array, that being a theoretical con, compared to a for-loop. Yet your examples don't showcase the use-cases of breaking/continuing so currently the examples are more verbose versions of native methods.
Appreciate the feedback, good point that I didn't dig in how to break out of the for loop. I assumed people knew how to do it but thats maybe a faulty assumption.
Good point about the for-of loop !== for loop, will be more careful in the future :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You put emphasis on the fact that map, filter and reduce go through every single element of the array, that being a theoretical con, compared to a for-loop. Yet your examples don't showcase the use-cases of breaking/continuing so currently the examples are more verbose versions of native methods.
Also for-of loop !== for loop.
Otherwise a good intro to more abstract methods.
Appreciate the feedback, good point that I didn't dig in how to break out of the for loop. I assumed people knew how to do it but thats maybe a faulty assumption.
Good point about the for-of loop !== for loop, will be more careful in the future :)