Returns a reference to the String function that created the object.
var str = new String( "This is string" ); console.log("str.constructor is:" + str.constructor)
On compiling, it will generate the same code in JavaScript.
Its output is as follows −
str.constructor is:function String() { [native code] }