Function with pop-ups

Report a typo

What will be the output of the following code in the alert box? Try not to run the code instead solve the task mentally.

function sum(x) {
    function add(y) {
        return x+y;
    }
    return add(x);
}

function callMe() { 
    result=sum(5); 
    alert(result);
}

callMe()
Select one option from the list

Create a free account to access the full topic