我想要{chrome}工具中写的console.log
件事。不幸的是,chrome的控制台响应了我的要求。这是代码:
var loop = function(){ while (i<4) { console.log("it's me, MARIO"); i++; } }
这是我的控制台回复。
var loop = function(){ while (i<4) { console.log("it's me, MARIO"); i++; } }
=> undefined
i = 0 // if loop works i should be 4 after calling loop();
=> 0
loop(); // we call loop.
=> undefined
i
=> 4 // so loop does work.