To me this is only taking bad code and making it worse, and it's an example of where the various callback-driven Array methods are flawed. Mind you, this isn't as flawed as "foreach", but it's damned close.

Probably not helping that extra comma meaning you're processing an empty record. :D

but seriously, all that junk and "functions for nothing" just to implement:

var result = [];

for (let value of data) result.push((value + 1) * 2);

I'll pass. THIS is what's wrong with the current mindset of most JS developers these days. Wah wah, you have a var and a for loop... whatever.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store