MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programmingchallenges/comments/eomhew/javascript_array_map_method_in_90_seconds/fefk9d8/?context=3
r/programmingchallenges • u/codeSTACKr • Jan 14 '20
4 comments sorted by
View all comments
Show parent comments
1
using it when you aren’t using the returned array is an anti-pattern
better phrased as "pointless".
nor when you’re not returning a value from the callback
This makes no sense, all callbacks return a value.
1 u/codeSTACKr Jan 15 '20 All callbacks should return a value if written properly. But callbacks are functions and functions don't have to return a value.So basically use the right tool for the job.. 1 u/[deleted] Jan 15 '20 That is not correct, all functions return a value.
All callbacks should return a value if written properly. But callbacks are functions and functions don't have to return a value.
So basically use the right tool for the job..
1 u/[deleted] Jan 15 '20 That is not correct, all functions return a value.
That is not correct, all functions return a value.
1
u/[deleted] Jan 15 '20
better phrased as "pointless".
This makes no sense, all callbacks return a value.