re: How to lose a Job in 10 minutes VIEW POST

FULL DISCUSSION
 

Is it a misuse of reduce to modify acc (because, ideally in functional programming, things are immutable), or does returning acc from the reducer function mitigate that?

 

Hey! Thanks!

I would go for the mitigation :P

const groupCitiesByRotatedNames = cities => newArray

I guess you could return always a clone of acc? For the purpose of the article, I would not give too much importance to this to be honest :)

code of conduct - report abuse