[英]Js Chrome dev tools prints Array with length but no children
你用的是什么版本的chrome? 您可能有一個大小為 10 的空數組。
var test = {
myArray: new Array(10)
};
console.log(test)
這會產生一個長度為 10 的數組,但這些項目沒有被初始化。 例如,在某些版本的 chrome 中,您不能在未初始化的數組上使用 map 函數。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.