fromEntries()
Object.fromEntries([
['foo', 1],
['bar', 2]
])
// {foo: 1, bar: 2}
entries()
const obj = {
name: 'jimmy',
age: 18
}
const entries = Object.entries(obj)
console.log(entries)
// [Array(2), Array(2)]
fromEntries()
Object.fromEntries([
['foo', 1],
['bar', 2]
])
// {foo: 1, bar: 2}
entries()
const obj = {
name: 'jimmy',
age: 18
}
const entries = Object.entries(obj)
console.log(entries)
// [Array(2), Array(2)]