constructor 屬性返回對創建此對象的數組函數的引用。
語法
object.constructor
例子
new Array().constructor//ƒ Array() { [native code] }
constructor.name屬性返回創建此對象的類名
語法
object.constructor.name
例子
new Array().constructor.name//"Array"
new Uint32Array(2).constructor.name//"Uint32Array"