Arrow functions and destructuring are two powerful features of JavaScript. When used in combination, they present a cool pattern that I like to call object transformation. The point is to write a simple function to change the structure of a given object, while keeping (some of) the attribute values.
#destructuring #ecmascript #patterns #javascript #programming