Object.fromEntries()
方法把键值对列表转换为一个对象。
const entries = new Map([
['foo', 'bar'],
['baz', 42]
]);
const obj = Object.fromEntries(entries);
console.log(obj);
// expected output: Object { foo: "bar", baz: 42 }
标签:jira,foo,const,18,Object,42,fromEntries
From: https://www.cnblogs.com/yao-655442/p/16760366.html