Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Write file

  • writeFile
const fs = require('fs');

fs.writeFile('data.txt', 'first line', (err) => {
    if (err) {
        console.log(err);
    } else {
        console.log('Success');
    }
});