Jul 25, 2017 · 1 min read
In what scenario would you use this over the example below. This can be called with an empty obj:
```
const createUser = (userName = ‘Anonymous’,
avatar = ‘anon.png’) => ({
userName,
avatar
});
```
In what scenario would you use this over the example below. This can be called with an empty obj:
```
const createUser = (userName = ‘Anonymous’,
avatar = ‘anon.png’) => ({
userName,
avatar
});
```