異步函數使用遞歸

var arr = [「a」,「b」,「c」]; (function loop(index) {     setTimeout(function(){//用setTimeout模擬異步函數         console.log(arr[index]);         if (++index<arr.length) {             loop(index);         } els
相關文章
相關標籤/搜索