Hello and I apologise if this is a stupid question but I am reading up on
Callbacks in node.js and wanted to ask something about it.
Example code:
fs.readFile('file1.txt', 'utf8', function (err, data) {
if (err) throw err;
console.log('File 1 read!');
});
I just dont know what the parameters *err* & *data* are, is this something
that the node.js engine resolves internally? Hope I am making sense, in
other coding you would create these variables and then pass them to a
method.
Thanks,
Dave Johnson.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en