标签: javascript node.js executioncontext
您好我对以下执行上下文感到困惑
let fs = require('fs'); let text; fs.readFile('message.txt', 'utf8', function(err, contents) { text = contents; } console.log(text)
文本在回调函数之外未定义。谢谢!