foreach循环对异步的处理

list.forEach(function(item,index){异步

  var sendData = function(index, message) {
    setTimeout(function() {
      sync(); //异步方法
    }, 200*index);
  }
  sendData(index, message)
})it

相关文章
相关标签/搜索