logo CodeStepByStep logo

functionMystery1

Language/Type: JavaScript basics functions reference semantics
Author: Melissa Hovik (on 2016/09/25)

Assume the following functions are defined:

function main() {
    function1();
    function2();
    console.log("Done with main.");
}

function function1() {
    console.log("Inside function 1!");
}

function function2() {
    console.log("Inside function 2!");
    function1();
    console.log("Done with function 2!");
}   

What console output would result from calling main?

output

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.