Function polyNewSymbol

  • Returns a new (polyfill) Symbol object for the provided description that's guaranteed to be unique. Symbols are often used to add unique property keys to an object that won't collide with keys any other code might add to the object, and which are hidden from any mechanisms other code will typically use to access the object. That enables a form of weak encapsulation, or a weak form of information hiding.

    Parameters

    • Optionaldescription: string | number

      The description of the symbol

    Returns symbol

    A new polyfill version of a Symbol object