--- title: Symbol.prototype slug: conflicting/Web/JavaScript/Reference/Global_Objects/Symbol tags: - ECMAScript6 - JavaScript - Propriété - Reference - Symbol translation_of: Web/JavaScript/Reference/Global_Objects/Symbol translation_of_original: Web/JavaScript/Reference/Global_Objects/Symbol/prototype original_slug: Web/JavaScript/Reference/Objets_globaux/Symbol/prototype ---
La propriété Symbol
.prototype
représente le prototype du constructeur {{jsxref("Symbol")}}.
Le code source de cet exemple interactif est disponible dans un dépôt GitHub. Si vous souhaitez contribuez à ces exemples, n'hésitez pas à cloner https://github.com/mdn/interactive-examples et à envoyer une pull request !
Les instances de {{jsxref("Symbol")}} héritent toutes de {{jsxref("Symbol.prototype")}}. Ce prototype du constructeur peut être utilisé afin d'ajouter des propriétés et/ou des méthodes pour chaque instance de Symbol
via la chaîne de prototypes.
{{js_property_attributes(0,0,0)}}
Symbol.prototype.constructor
Spécification | État | Commentaires |
---|---|---|
{{SpecName('ES6', '#sec-symbol.prototype', 'Symbol.prototype')}} | {{Spec2('ES6')}} | Définition initiale. |
{{SpecName('ESDraft', '#sec-symbol.prototype', 'Symbol.prototype')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.Symbol.prototype")}}