DEV Community

Discussion on: How I reverse engineered RxJs and Learned Reactive Programming?

Collapse
 
joemaffei profile image
Joe Maffei

Excellent article! I don’t see anything wrong with using for...of in your first implementation. Also, if we want to be technical about it, the refactor should’ve used forEach, not map.

Collapse
 
shadid12 profile image
Shadid Haque

Good one ;)

Collapse
 
clarity89 profile image
Alex K.

Yeah, plus map returns a new array, which is not really needed in this case, so something like forEach fits better.