![]() |
VOOZH | about |
JavaScript Symbol species property specifies a function-valued property that the constructor function uses to create derived objects. With this, we can create a derived object.
Syntax:
[Symbol.species]
Property attributes: The species accessor property can be used to allow subclasses to override the default constructor for objects.
Return value: It returns a derived object.
Below examples illustrate the Symbol species property in JavaScript:
Example 1:
Output:
false false
Example 2:
Output:
false trueSupported Browsers: The browsers supported by JavaScript Symbol species property are listed below:
We have a complete list of Javascript symbols' properties and methods, to check those please go through the Javascript Symbol Complete Reference article.