What is the purpose of using WeakMap instead of Map for implementing a hash table?
WeakMap's advantage lies in memory management: 1) Allows garbage collection of keys when they're no longer referenced elsewhere, 2) Prevents memory leaks in long-running applications, 3) Ideal for storing metadata about objects, 4) Keys must be objects, not primitive values, 5) No size property or iteration methods available, 6) Useful for implementing caches that shouldn't prevent garbage collection, 7) Better memory efficiency for temporary associations, 8) Common in frameworks for storing private data.