node.js - result is not coming in a call back function -


i have following code

parsebookmark(user_id, category_ids,bookmark_url,function(err, result) {                 console.log("parse rersult " +json.stringify(result));                //output undefined here         });  function parsebookmark(user_id, category_ids,bookmark_url,callback) {  savebookmark(user_id,category_ids,title,bookmark_url,function(err, result) {     //result coming here     callback(result); });  } 

why output coming undefined here. suggestion please.

thanks

change savebookmark call to:

savebookmark(user_id,category_ids,title,bookmark_url,function(err, result) {     callback(err, result); }); 

if understand code correctly console log second time err variable, undefined.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -