Adding and deleting items from WeakSet

Now, we'll take a look at the corresponding weak data structure, WeakSet. In this recipe, we'll look at how to add and delete items from a WeakSet, using the respective instance methods, and at some restrictions on membership.

Get ECMAScript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.