Node.js fs readFile(callback)
var fs = require("fs"); var callback = function(err, data) { console.log(data);// w ww . j a v a 2 s . c om } fs.readFile("test.txt", callback); fs.readFile("test2.txt", callback); console.log("Do other tasks");