ES6 String对象属性Constructor
ES6 String对象属性Constructor
constructor返回创建该对象的函数的引用
语法
string.constructor
返回值
返回创建此对象实例的函数。
例子
var str = new String( "This is string" ); console.log("str.constructor is:" + str.constructor)
输出
str.constructor is:function String() { [native code] }