Return the function that created the String object's prototype:
var x = str.constructor;
The result of x will be:
Try it yourself »
Definition and Usage
The constructor property returns the function that created the String object's prototype.
Note: The value of this property is a reference to the function itself, and not a string that contains the name of the function.
The constructor property is supported in all major browsers.
|Return Value:||The function that created the String object's prototype|
Thank You For Helping Us!
Your message has been sent to W3Schools.