JavaScript Objects The Strings Object- Constructor - Javascript Objects

What is JavaScript String - constructor Property?

A JavaScript string- constructor returns a reference to the string function that created the instance's prototype.

Syntax

Its syntax is shown below −

Return Value:

It returns the function that created this object's instance.

Example:

Output:

str.constructor is: function String() { [native code] }

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Javascript Objects Topics