node.js之forEach forEach用法: var array1=[1,2,3]; array1.forEach(function(item,index){ console.log(item+'---'+index); });