Thursday, 10 January 2013

Call Back in node.js

-->
We can add call back in node.js in two ways
1.Write a call back inside a method
Ex:
fs.readFile('/abc/def',function(err,data) {
console.log(data);
});
2. Create a variable for call back and add call back to the function.
var callback=function(err,data){
console.log(data);
}
fs.readFile('/abc/def',callback);

Related Posts:

  • Call Back in node.js !-- google_ad_client = "ca-pub-4378340310740210"; /* rectangle-nodemongo */ google_ad_slot = "1751391070"; google_ad_width = 336; google_ad_height = 280; // --> We can add call back in node.js in two ways 1.Write a ca… Read More

0 comments:

Post a Comment