📜  获取 json 数组长度 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:58.060000             🧑  作者: Mango

代码示例1
let index = 0;
                     destination.addEventListener("click", function(){
                            destination.innerHTML = `

Planet ${json[index].name}

`; index = (index+1)% json.length; });