MCQs > IT & Programming > Node.js > Which of the given statements is correct about the following program? function mSync (ar1, ar2) { if (ar1){ ar2('Data Cached') } else { setTimeout(function () { ar2('Data Loaded ') }, 2000); } } mSync(true, function (value) { prg1(); }); prg2(); function prg2(){console.log('Good Morning')} function prg1(){console.log('Good Evening')}

Node.js MCQs

Which of the given statements is correct about the following program?

function mSync (ar1, ar2) {

if (ar1){

ar2("Data Cached") }

else {

setTimeout(function () {

ar2("Data Loaded ")

}, 2000);

} }

mSync(true, function (value) {

prg1();

});

prg2();

function prg2(){console.log("Good Morning")}

function prg1(){console.log("Good Evening")}


Answer

Correct Answer:

It will immediately display the following output:

Good Evening

Good Morning 


Explanation:

Note: This Question is unanswered, help us to find answer for this one

Node.js Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Node.js Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it