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 :)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.