目录

constructor

构造函数返回对创建实例原型的字符串函数的引用。

语法 (Syntax)

string.constructor

返回值 (Return Value)

返回创建此对象实例的函数。

示例:String构造函数属性

var str = new String( "This is string" ); 
console.log("str.constructor is:" + str.constructor)

输出 (Output)

str.constructor is:function String() { [native code] }
↑回到顶部↑
WIKI教程 @2018