其實,我不知道這叫做什麼。 我想在JavaScript中做這種Python-snippet。Javascript中的「Double-array」
在此先感謝!
array = {'http://facebook.com' : 'facebook',
'https://twitter.com' : 'twitter',
'https://google.com' : 'google'}
for domain, name in array.items():
print 'The name of '+domain+' is '+name
編輯,對不起我的misstake與和: 是累編碼...
Folks - 這不是Javascript,也不是問題。 –
典型的習慣用法是數組或數組對象的數組。 – deceze
這不是一個有效的python。 –