Created
July 14, 2017 08:22
-
-
Save SunXiaoShan/53dd627dcc1e71ccad2e1ee5f19cf541 to your computer and use it in GitHub Desktop.
callbackDemo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main(data,cb){ | |
fun1(data,function(err,data){ | |
if(!err){ | |
fun2(data,function(err,data){ | |
if(!err){ | |
fun3(data,cb); | |
}else{ | |
cb(err); | |
} | |
}); | |
}else{ | |
cb(err); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment