![](/img/trans.png)
[英]How to display all entries of an array within Chrome's, Firebug's and Firefox's console?
[英]How to get local variables array with firefox/firebug/chrome debugger?
firefox / firebug / chrome调试器是否提供用于在控制台中获取局部变量数组的api? 还是有一些提供api这样的软件?
局部变量,如函数范围内的变量?
不,除非您使用this
或prototype
从函数内部公开它们,否则您将无法查看它们
编辑:更多信息
function Car(color){ this.color = color; }
var myCar = new Car("red");
myCar.color // This would output red, and if myCar was globally defined you could view it.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.