非标准
该特性是非标准的,请尽量不要在生产环境中使用它!

概述

返回一个字符串,代表该数组的源代码.

语法

array.toSource()

参数

描述

在调试时,你可以使用toSource方法来查看一个数组的内容.

例子

例子: 查看数组的源码

var alpha = new Array("a", "b", "c");

alpha.toSource();   //返回["a", "b", "c"]

浏览器兼容性

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
Basic support
Non-standard
Chrome No support NoEdge No support NoFirefox Full support 1IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No

Legend

Full support  
Full support
No support  
No support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.

相关链接

文档标签和贡献者

此页面的贡献者: fscholz, badfl, teoli, ziyunfei
最后编辑者: fscholz,