Carefully study the following code snippet and answer the question that follows:
new_function (true, function (data){
func1(); });
func2();
function func1(){console.log("Clouds")}
function func2(){console.log("Sunshine")}
function new_function (ar1, ar2) {
if (ar1) {
???
}
else {
setTimeout(function () {
ar2()
}, 1000);
} }
Which of the given code lines should be written in place of "???" in the above program so that the following output is obtained?
Correct Answer:
process.nextTick(function () {
ar2();
});
Explanation:
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
More Node.js MCQ Questions