Skip to content

Commit 2fdfaf0

Browse files
committed
# map to object using Object.fromEntries
1 parent a8abeff commit 2fdfaf0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

note.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,6 +2457,11 @@ const a = 'Wes Bos,ScottTolinski'.split('.')
24572457
a.map(x => x.split(' '))
24582458
Object.fromEntries($_) // $_ is the last thing returned from dev tools.
24592459
2460+
const names = new Map()
2461+
names.set('wes', 'cool')
2462+
names.set('scott', 'neat')
2463+
Object.fromEntries(names)
2464+
24602465
```
24612466

24622467
---

0 commit comments

Comments
 (0)