【发布时间】:2016-12-22 05:55:37
【问题描述】:
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);
我想遍历每个并为每个打印上面的语句。我该怎么做才最好?
【问题讨论】:
标签: javascript javascript-objects