Skip to content

Commit a8abeff

Browse files
committed
# Array to Object method using Object.fromEntries
1 parent 5b11016 commit a8abeff

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

note.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,12 @@ numbers = numbers.sort(function(){ return Math.random() - 0.5});
24502450
let a = 0;
24512451
let b = ( a++, 99 );
24522452
console.log(a); // a will be equal to 1
2453-
console.log(b);
2453+
console.log(b); // b will be equal to 99
2454+
2455+
// Array to Object method
2456+
const a = 'Wes Bos,ScottTolinski'.split('.')
2457+
a.map(x => x.split(' '))
2458+
Object.fromEntries($_) // $_ is the last thing returned from dev tools.
24542459
24552460
```
24562461

0 commit comments

Comments
 (0)