【发布时间】:2021-06-06 11:20:34
【问题描述】:
为什么 Chrome Dev Tools 会在水果数组前面放一个“(3)”,而不是年份数组?
第一个是这样获取的结果:
fetch('http://localhost:8000/damagequery')
.then(response => response.json())
.then(data => {
data.forEach(element => {
console.log(element[""][1])
damageCount.push(element[""][0])
year.push(element[""][1].toString())
// [0][""]
// [0][""][0]
});
});
第二个就是这样的测试:
let fruit = ['Apples', 'Bananas', 'Oranges']
【问题讨论】:
-
定义“差异”。
-
好吧,您会看到开发工具如何在水果数组前面放置一个“(3)”,但不是年份。这是为什么呢?
-
这是数组的长度。
-
对了,但是为什么前面没有一个“(6)”呢?
标签: javascript highcharts