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 2015년 7월.
get() 메서드는 Map 객체에서 특정 요소를 반환합니다. 만약 주어진 키와 관련된 값이 객체라면 해당 객체에 대한 참조만 가져오고, 해당 객체에 대한 모든 변경은 Map 내에서 효율적으로 수정됩니다.
Map 객체에서 반환받을 요소의 키
명시된 키와 연관된 요소 혹은 Map 객체에서 해당 키를 찾을 수 없는 경우 undefined.
맵이 원본 객체에 대한 참조만 보유하고 있다는 것은 해당 객체가 가비지 콜렉션되지 않을 수 있으며 이로 인해 예측하지 못한 메모리 문제가 일어날 수 있음을 의미합니다. 만약 맵에 저장되어 있는 객체가 원본 객체와 동일한 수명을 가지게 하려면 WeakMap을 고려하시기 바랍니다.
| ECMAScript® 2027 Language Specification # sec-map.prototype.get |
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.