And, see, I would actually invert further. The declaration should be:
elements = [1,2,3,4];
doubledElements = doubleElements(elements)
Basically, if you see the words map, fold, reduce in your code, you are probably not as easy to understand as you'd like to think.
Of course, in the cooking methaphor, I'm ok with mutating elements and just doing:
elements = [1,2,3,4];
doubleElements(elements);
This clearly has issues if multiple "cooks" are working with elements. But is ridiculously easy to intuit regardless. (Precisely because in real life so many things are changed by imperative commands.)