logger.js
file exports log()
function. Content of the logger.js
file:function log(message) {
console.log(message)
}
module.exports = log
The log()
function is called in the index.js
file:const log = require('./logger')
log('some text')