We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
答案:error-first callback 用来传递错误和数据。第一个参数永远是一个错误对象(error-object),回调函数必须检查它。余下的参数用不过来传递数据。
解析:
fs.readFile(filePath, function(err, data) { if (err) { //处理出现错误的情况 } //处理数据 });
考察面试者对于 Node 异步操作基本知识的见解
The text was updated successfully, but these errors were encountered:
No branches or pull requests
答案:error-first callback 用来传递错误和数据。第一个参数永远是一个错误对象(error-object),回调函数必须检查它。余下的参数用不过来传递数据。
解析:
考察面试者对于 Node 异步操作基本知识的见解
The text was updated successfully, but these errors were encountered: