Complete the code to import the 'fs' module using CommonJS require.
const fs = [1]('fs');
In CommonJS, require is used to import modules.
Complete the code to export a function named 'greet' using module.exports.
module.exports = [1];You assign the function name directly to module.exports to export it.
Fix the error in importing the default export from 'math.js' using require.
const add = [1]('./math.js');
Use require to import modules in CommonJS, not import.
Fill both blanks to export an object with two functions, 'start' and 'stop'.
module.exports = { [1], [2] };Export an object with keys matching the function names you want to export.
Fill all three blanks to import 'readFile', export a function 'writeFile', and assign it to module.exports.
const { [1] } = require('fs');
function [2](path, data) {
// write data to file
}
module.exports = [3];You import readFile from 'fs', define writeFile function, and export it.
