可能性の重複:
Is Chrome's JavaScript console lazy about evaluating arrays?なぜ、Chromeは値が表示される前に配列から削除されていると表示していますか?
Chromeのjsの値が削除される前に、コンソールが削除さ値を持つ配列を示しています。どうして?
jsFiddle that demonstrates this behavior。クロムconsole.log
で
var list=[];
list.push("one");
list.push("two");
list.push("three");
console.log(list); //["two", "three", undefined × 1]
$("#output").append(JSON.stringify(list));//["one","two","three"]
list.shift();
$("#output").append($("<br>"));
console.log(list); //["two", "three"]
$("#output").append(JSON.stringify(list));//["two","three"]
同様の質問について、より信頼できる回答があります。http://stackoverflow.com/questions/4198912/bizarre-console-log-behaviour-in-chrome-developer-tools、http://stackoverflow.com/questions/11214430/wrong-value-in-console-log、http://stackoverflow.com/questions/11118758/bug-in-console-log –
http://stackoverflow.com/questions/4057440/is-chromes -javascript-console-lazy-about-evaluating-arrays?lq = 1 –
この問題について重複した質問がありますか? –