什麼最容易理解解決走出值如下:提取值
Bill, Smith, 32
Sarah, Lord, 28
我只得到了這麼遠:
HTML
<a href="#" onclick="displayEmployees();">displayEmployees</a>
的Javascript
function displayEmployees() {
var employees = new Array();
employees['firstName'] = new Array('Bill','Sarah','Elizabeth','David','Robert');
employees['lastName'] = new Array('Smith','Lord','Crayford','Clark','Robinson');
employees['age'] = new Array('32','28','20','54','18');
for(x in employees) {
var value = employees[x]
document.write(value + "<br />");
}
難道你不認爲這個答案看起來像現有答案的混合 – bugwheels94
@Ankit難道你不認爲我投票的問題與投票無關嗎?答案肯定比接受的答案更清晰,甚至沒有更好的格式; 2.第二個答案(Esailija)實際上並沒有回答這個問題? – Chris
@ChrisDemetriad讓我客氣清楚你一兩件事,我沒有downvote你隊友 – bugwheels94