freewind / async_demo Goto Github PK
View Code? Open in Web Editor NEWA demo for async
A demo for async
你好,Async初学者,感谢无私的分享经验,现在有点迷惑,whilst里demo中的例子是这样的。
var count1 = 0;
async.whilst(
function() { return count1 < 3 },
function(cb) {
log('1.1 count: ', count1);
count1++;
setTimeout(cb, 1000);
},
function(err) {
// 3s have passed
log('1.1 err: ', err); // -> undefined
}
);
想请教,这个cb具体是用传递的么?如果需要传递,请问格式是什么呢?能带参数么?
如果第三个函数 err 不为空 是不是循环就跳出了?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.