它返回对创建实例原型的Number函数的引用。
其语法如下−
number.constructor()
返回创建此对象实例的函数。
链接:https://www.learnfk.comhttps://www.learnfk.com/javascript/number-constructor.html
来源:LearnFk无涯教程网
<html> <head> <title>JavaScript constructor() Method</title> </head> <body> <script type="text/javascript"> var num=new Number( 177.1234 ); document.write("num.constructor() is : " + num.constructor); </script> </body> </html>
num.constructor() is : function Number() { [native code] }
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)