node.js - Node JS I/O return function -


i have problem code in node js i/o

function 1 sends message function 2 , takes result. function 2 searches files-name form disk , return name.

in situation message "undefined". after in console log show file name written in function 2.

i want take message file-name @ "undefined".

if don't mind, give me example.

thank giving me advices.

i took of yours, "callback function" best choice think.

after project, using node.js centos6, async makes race condition.

so, used callback function stability.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -