例子
window.checklist=[{"boardname":"motor_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"power_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"imu_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"sensor_board","cur":"1.0.0","new":"1.0.1"}] board_list={"imu_board":[,,,,,,,],"sensor_board":[,,,,,,,],"power_board":[,,,,,,,],"motor_board":[,,,,,,,]} findsuccess=function(list){
for(i in list){
if(list[i]==){
return true
}
}
return false
}
for (let i = ;i < ;i++){
x=board_list[window.checklist[i].boardname]
console.log(x)
console.log(findsuccess(x))
}
例子
window.checklist=[{"boardname":"motor_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"power_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"imu_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"sensor_board","cur":"1.0.0","new":"1.0.1"}] board_list={"imu_board":[,,,,,,,],"sensor_board":[,,,,,,,],"power_board":[,,,,,,,],"motor_board":[,,,,,,,]} findsuccess=function(list){
for(i in list){
if(list[i]==){
return true
}
}
return false
} for (var i = ; i < ; i++) {
x=board_list[window.checklist[i].boardname]
console.log(x)
console.log(findsuccess(x))
}