Basic JavaScript - Passing Values to Functions with Arguments

Tell us what’s happening:
Hello, I’m stuck on a lesson with arguments and functions. I can’t quite figure out what’s the missing piece here? Code is below:

function functionWithArgs(a, b) {
console.log(a + b);
functionWithArgs(1, 2);

functionWithArgs(a, b); {
console.log(a + b);
functionWithArgs(7, 9);

You don’t need to define the function twice. The first one works just fine. Also, the second one has a syntax error. You can’t put a semicolon after the parentheses like that.

1 Like

Did you put the entire code block in the response? Indeed, if you just put

Mod edit: solution redacted

", the test shall pass.

1 Like

I thought the test was briefing me to find the output of both 3 with (1,2) and 16 with (9,7)… That’s what I thought it was telling me to do at the bottom testing instructions… :sweat_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.