Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020년 1월.
Object.fromEntries() 메서드는 키값 쌍의 목록을 객체로 바꿉니다.
반복 가능한 객체. 즉, Array, Map 또는 반복 규약을 구현한 기타 객체.
속성의 키와 값을 반복 가능한 객체에서 가져온 새로운 객체.
Object.fromEntries() 메서드는 키값 쌍 목록을 받고, 그 목록을 사용해 속성을 부여한 새로운 객체를 반환합니다. iterable 인자는 @@iterator 메서드를 구현하여 반복기 객체를 반환해야 하고, 그 반복기는 또 배열 형태의 객체로 요소 2개를 반환해야 합니다. 반환된 요소 중 첫 번째는 생성할 객체의 속성 키로, 두 번째는 속성 값으로 사용합니다.
Object.fromEntries()는Object.entries()의 역을 수행합니다.
Object.fromEntries()와 그 역인 Object.entries(), 그리고 배열 변형 메서드를 통해 객체를 변환할 수 있습니다.
| ECMAScript® 2027 Language Specification # sec-object.fromentries |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.