2013年8月29日

nodejs setTimeout函数使用

摘要: node.js,说简单点,基于Google V8引擎的,运行在服务器端的JavaScript。具有单线程、非阻塞IO、事件驱动等特性。学习的这几天,感受最深的还是非阻塞IO。由于采用Google V8引擎,node.js可以异步处理数据,举个最简单的例子。12345678setTimeout(function(){console.log('5')},5000);console.log('1');function test(){setTimeout(function(){console.log('2')},1000);}test();console 阅读全文

posted @ 2013-08-29 11:31 joygpwan 阅读(28967) 评论(0) 推荐(1) 编辑

导航