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