Node.js 如何使用node js管理串联函数调用

Node.js 如何使用node js管理串联函数调用,node.js,Node.js,我使用了step,即使调用了并行函数,执行也应该是串联的。请告诉我哪里出了问题 //sample code var step=require('step') step( function first() { process();//calling function here return this; returning this to next function }, function second() { process2();

我使用了step,即使调用了并行函数,执行也应该是串联的。请告诉我哪里出了问题

   //sample code
   var step=require('step')
   step(
   function first()
   {
   process();//calling function here
   return this; returning this to next function
   },
   function second()
   {
   process2();//calling another fun here
   return this;
   },
   function third()
   {
   process3();//calling function here
   return this; returning this to next function
   } 
   );//step end here
请帮帮我。 谢谢

你好,

您必须同步这些函数。这里的步骤不适用于递归函数

试试这个,你会得到答案的

你好,

您必须同步这些函数。这里的步骤不适用于递归函数


试试这个,你会得到答案。

请通过以下链接:

视频:

正文:


这可能对您有所帮助。

请浏览以下链接:

视频:

正文:

这可能对你有帮助

var sync =require('async');
sync.series([
function(callback){
console.log("calling one");
callback(null, 'one');
},
function(callback){
console.log('two');
callback(null, 'two');
},
]);