logo CodeStepByStep logo

parameterMystery15

Language/Type: JavaScript parameters

The following console program uses returns and produces three lines of output. What are they?

function main() {
    let a = 4;
    let b = 2;
    let c = 5;
    a = mystery(c, b);
    c = mystery(b, a);
    console.log(a);
    console.log(b);
    console.log(c);
}

function mystery(b, c) {
    return c + 2 * b;
}
line 1
line 2
line 3

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.