We just saw how to create a Set from existing data. The related class WeakSet can be created in a similar way, but has restrictions on membership. In this recipe, we'll take a look at how to create a WeakSet from existing data and some restrictions on membership.
Creating a WeakSet from existing data
Getting ready
This recipe assumes that you already have a workspace that allows you to create and run ES modules in your browser. If you don't, refer to the first two chapters.
How to do it...
- Open your command-line application, and navigate to your workspace...