Working with Maps and Symbols

In this chapter, we will cover the following recipes:

  • Using Symbol to create a local instance
  • Using Symbol.for to create a global instance
  • Using Symbol to simulate enums
  • Setting and deleting entries from Map
  • Creating a Map from the existing data
  • Creating a class that wraps Map to work with specific complex types
  • Setting and deleting entries from WeakMap
  • Creating a WeakMap from existing data
  • Creating a class that uses WeakMap to work with specific complex types
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.65.233