Consider the code below.

calculator.js 

exports.add=function (num1,num2){ 
       return num1+num2; 
} 
exports.sub=function (num1,num2){ 
        return num1-num2; 
} 

TestCalculator.js 

var cal=require("./calculator"); 

Which of the below statements is  true with respect to the code in TestCalculator.js file?

Only add method can be invoked
Only sub method can be invoked
Both add and sub methods can be invoked
Not possible to invoke add and sub methods
Verified Answer
Correct Option - c

To get all Infosys Certified Node Developer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram