--- title: Number.prototype.toSource() slug: Web/JavaScript/Reference/Global_Objects/Number/toSource translation_of: Web/JavaScript/Reference/Global_Objects/Number/toSource ---
toSource()
方法返回该对象源码的字符串表示。
numObj.toSource(); Number.toSource();
无
toSource()
方法返回下列值:
Number
对象, toSource()
返回下面字符串,用来指明源码是不可见的。function Number() { [native code] }
Number
对象的实例,toSource()
返回一个表示源码的字符串。该方法通常被 JavaScript 内部调用,而不是在代码中显示调用。
不是任何标准的一部分。在 JavaScript 1.3 被实现。