如何更改此DEBUG代码以对应窗口对象?
What is the JavaScript equivalent of var_dump or print_r in PHP?
确定
C:\Program Files\Git\usr\bin
错误
var hoge = new Object(); hoge.q = "stack"; hoge.lang = "js"; hoge.state = 1; dump(hoge, 'body');
错误
dump(hoge, this);
答案 0 :(得分:0)
你还必须定义repeatString,是吗?
function repeatString(str, num) {
out = '';
for (var i = 0; i < num; i++) {
out += str;
}
return out;
}
并且只有dump(hoge, 'body');
可供使用