Consider two files: first.js and second.js in a Node.js project. Content of the first.js file is given as:
module.exports = function() {
console.log("function in file first");
Which of the following lines of code should be written in the second.js file in order to import the function given in the first.js file to the second.js file?
Correct Answer:
var x = require('./first');
x();
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Node.js MCQ Questions