var teams = [
{
city: 'Vancouver',
nickname: 'Canucks',
league: 'NHL'
},
{
city: 'San Jose',
nickname: 'Earthquakes',
league: 'MLS'
},
{
city: 'Sacramento',
nickname: 'Kings',
league: 'NBA'
}
]
document.write("The " + this.city + " " + this.nickname + " play in the " + this.league);
我想遍历每个打印每个上述语句。我最好怎么做?我将如何遍历一组JS对象并为每个对象打印语句?