Mögliche Duplizieren:
Is Chrome's JavaScript console lazy about evaluating arrays?Warum zeigt Chrome einen Wert an, der bereits aus einem Array entfernt wurde?
Chrome js Konsole ein Array mit einem gelöschten Wert zeigt, bevor der Wert wird gelöscht. Warum?
jsFiddle that demonstrates this behavior.
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"]
Möglicherweise gibt es autoritativere Antworten auf ähnliche Fragen: http://stackoverflow.com/questions/4198912/bizarre-console-log-behaviour-in-chrome-developer-tools, http://stackoverflow.com/questions/11214430/false-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 –
Haben wir eine Reihe von doppelten Fragen für dieses Problem? –