質問 1
Explain the 'WeakMap' and 'WeakSet' data structures in ES6.
WeakMap and WeakSet are similar to Map and Set, respectively, but they allow for garbage collection of keys and values that are not used elsewhere.
Example:
let weakMap = new WeakMap(); let obj = {}; weakMap.set(obj, 'some value');
復習用に保存
復習用に保存
この項目をブックマークに追加したり、難しい内容としてマークしたり、復習セットに入れたりできます。
役に立ちましたか?
コメントを追加
コメントを見る