What version of chrome are you on? It is likely you have an empty array of size 10.
var test = {
myArray: new Array(10)
};
console.log(test)
This results in an array of length 10 but the items are not initialized. In some versions of chrome, for example you could not use the map function on an uninitialized array.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.