logo CodeStepByStep logo

parameterMystery7

Language/Type: JavaScript parameters return

The following console program uses parameters and produces five lines of output. What are they?

function main() {
    let x = "javascript";
    let y = "tyler";
    let z = "tv";
    let rugby = "hamburger";
    let javascript = "donnie";
    hamburger(x, y, z);
    hamburger(z, x, y);
    hamburger("rugby", z, javascript);
    y = hamburger(y, rugby, "x");
    hamburger(y, y, "javascript");
}

function hamburger(y,z,x) {
    console.log(z + " and " + x + " like " + y);
    return z;
}
line 1
line 2
line 3
line 4
line 5

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.