DEV Community

Discussion on: The JavaScript Array Map() Method

Collapse
 
sarah_chima profile image
Sarah Chima

Thank you, Sandor, for pointing this out. That example was just to show that logic can be used in the map method. However, as you clearly pointed out, the filter method is a more efficient way of achieving that. In fact, my next post is on the filter method. I am going to update that example to add this point in order not to confuse anyone.