Change all snippets from var to const
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
Use `map()` to create objects for each key-value pair, combine with `Object.assign()`.
|
||||
|
||||
```js
|
||||
var objectFromPairs = arr =>
|
||||
const objectFromPairs = arr =>
|
||||
Object.assign(...arr.map( v => {return {[v[0]] : v[1]};} ));
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user