226 B
226 B
Square The Data
Use mapObject to return a object from array passed as an argument which gets sqaured as math operation
const squareIt = arr => mapObject(arr, a => a*a)
squareIt([1,2,3]) // { 1: 1, 2: 4, 3: 9 }