Javascript 定义数组和遍历数组
const info = [
{id: 1000, name: 'zhangsan'},
{id: 1001, name: 'lisi'},
{id: 1002, name: 'wangwu'}
]
info.forEach( function(item) {
alert(item.id + '---' + item.name);
})
Please follow WeChat's public account ByCAD