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

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - JavaScript + Thymeleaf - select onchange -

node.js - Using Node without global install -