Transforms a list of key-value pairs into an object.
문법
Object.fromEntries(iterable): object예제
아래 값을 입력하면 예제에 즉시 반영됩니다.
const→entries→string→obj→Object→fromEntries→console→const entries: [string, number][] = [["a", 1], ["b", 2]];
const obj = Object.fromEntries(entries);
console.log(obj); // { a: 1, b: 2 }