非标准
概述
返回一个字符串,代表该数组的源代码.
Method of Array |
|
|---|---|
| Implemented in | JavaScript 1.3 |
| ECMAScript Edition | none |
语法
array.toSource()
参数
无
描述
在调试时,你可以使用toSource方法来查看一个数组的内容.
例子
例子: 查看数组的源码
var alpha = new Array("a", "b", "c");
alpha.toSource(); //返回["a", "b", "c"]