★ wanayoo — archive 1999 https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Symbol/prototypeNouvelle recherche | Portail wanayoo

Join MDN and developers like you at Mozilla's View Source conference, November 2-4 in Portland, Oregon. Learn more at https://viewsourceconf.org/.

Symbol.prototype

by 1 colaborador:
Nossos voluntários ainda não traduziram este artigo para o Português (do Brasil). Junte-se a nós e ajude a fazer o trabalho!

This is a new technology, part of the ECMAScript 2015 (ES6) standard .
This technology's specification has been finalized, but check the compatibility table for usage and implementation status in various browsers.

The Symbol.prototype property represents the prototype for the Symbol constructor.

Property attributes of Symbol.prototype
Writable no
Enumerable no
Configurable no

Description

Symbol instances inherit from Symbol.prototype. You can use the constructor's prototype object to add properties or methods to all Symbol instances.

Properties

Symbol.prototype.constructor
Returns the function that created an instance's prototype. This is the Symbol function by default.

Methods

Symbol.prototype.toSource()
Returns a string containing the source of the Symbol object. Overrides the Object.prototype.toSource() method.
Symbol.prototype.toString()
Returns a string of containing the description of the Symbol. Overrides the Object.prototype.toString() method.
Symbol.prototype.valueOf()
Returns the primitive value of the Symbol object. Overrides the Object.prototype.valueOf() method.

Specifications

Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Symbol.prototype' in that specification.
Standard Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 36.0 (36.0) Not supported Not supported Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) 36.0 (36.0) Not supported Not supported Not supported

Etiquetas do documento e colaboradores

Contributors to this page: fscholz
Última atualização por: fscholz,