mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
522 B
522 B
id | title |
---|---|
87eebd15-af30-482c-83be-d9f77ecf83d0 | Object.fromEntries |
Given an iterable over [key,value] pairs, Object.fromEntries()
creates an object. It does the opposite of Object.entries. See the proposal1 for more information.
Syntax
console.log(
Object.fromEntries([
["foo", 1],
["bar", 2],
])
); // { foo: 1, bar: 2 }