Skip to content

Instantly share code, notes, and snippets.

@Munter
Created July 23, 2016 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Munter/887971ee97b5c6ae92253eabd738637a to your computer and use it in GitHub Desktop.
Save Munter/887971ee97b5c6ae92253eabd738637a to your computer and use it in GitHub Desktop.
What is the expected console output of the following?
var fs = require('fs');
fs.open('hello-world.txt', 'ax', function (err, fd) {
if (err) {
console.error(err);
}
fs.write(fd, new Buffer('hello world'), function (err) {
if (err) {
console.log('manual', 'noooo');
} else {
console.log('manual', 'yay');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment