> For the complete documentation index, see [llms.txt](https://april.gitbook.io/learning-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://april.gitbook.io/learning-js/chapter-10./10.2-weakmap.md).

# 10.2 위크맵 (WeakMap)

### WeakMap과 Map의 차이점

* 키는 반드시 객체
* WeakMap의 키는 가비지 콜렉션에 포함될 수도 있음
* WeakMap은 이터러블이 아님 (메모리 유지X)
* WeakMap은 clear() 메서드가 없음

### WeakMap

* 객체 인스턴스의 전용키 저장에 알맞음
