What is the difference between Map and WeakMap?
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: medium
标签: Senior Full-Stack
参考答案摘要
A map accepts any type of value like string, boolean, number, etc., whereas a WeakMap only accepts only objects as keys. Maps are iterable, but WeakMaps are not. A “Map” has a size property, but a “We...
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。