The Symbol
.prototype
property represents the prototype for the Symbol
constructor.
Property attributes of Symbol.prototype
| |
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
Symbol
instances inherit from Symbol.prototype
. You can use the constructor's prototype object to add properties or methods to all Symbol
instances.
Symbol.prototype.constructor
Symbol
function by default.Symbol.prototype.toSource()
Symbol
object. Overrides the Object.prototype.toSource()
method.Symbol.prototype.toString()
Object.prototype.toString()
method.Symbol.prototype.valueOf()
Symbol
object. Overrides the Object.prototype.valueOf()
method.Symbol.prototype[@@toPrimitive]
Symbol
object.Specification | Status | Comment |
---|---|---|
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Symbol.prototype' in that specification. | Standard | Initial definition. |
ECMAScript Latest Draft (ECMA-262) The definition of 'Symbol.prototype' in that specification. | Draft |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 38 | 12 | 36 | No | 25 | 9 |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|---|---|
Basic support | Yes | 38 | Yes | 36 | 25 | 9 | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/prototype