function d() {
fs.exists(path,function(exists){
var o= (exists ? "存在" : "不存在!");
return o;
});
}
return d();
//我想把o赋值给function d;因为另一个文件需要o的值。
//上面的return o 不对怎么办。
function d(callback) {
fs.exists(path,function(exists){
var o= (exists ? "存在" : "不存在!");
callback(o);
});
}
function a(arg){
console.log(arg);
}
d(a);