Friday, 17 March 2017

Node.JS call function can't with dictionary

I am new Node.JS developer. I have a question, when I call function the parameter with Dictionary format. Then function that had been call can't be execute, why?

function testFunction(allObjects, test, response) {
  console.log("go in testFunction");

  var dic = {a: "aaa", b:"bbb"};
  testFunctionTo(dic, response);
}

function testFunctionTo(dic, response) {

  console.log("go in testFunctionTo");
  response.send("success");
}

result:

go in testFunction



via 章恩齊

No comments:

Post a Comment