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