Basic JavaScript - Passing Values to Functions with Arguments

I am stuck on the section named “Passing Values to Functions with Arguments”:
I am unable to input correctly, I need help in understanding what I am doing wrog- I have tried at least 20 times!.

Your code so far
function functionWithArgs(a, b, c, d) {
console.log(1 + 2);
console.log(7 + 9);
}
functionWithArgs(1, 2); //Outputs 3;
functionWithArgs(7, 9); //Outputs 19;

function functionWithArgs(a, b, c, d) {
  console.log(1 + 2);
  console.log(7 + 9);
}
functionWithArgs(1, 2); //Outputs 3;
functionWithArgs(7, 9); //Outputs 19;

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Passing Values to Functions with Arguments

Link to the challenge:

you need to understand this line a bit better before you code.

The exercise is trying to introduce parameters to you.

the parameter is a “placeholder”

you use it inside the function to do useful work (like adding the parameters together)

Can you take another look at the instructions and rewrite your code to use the parameters of the function?
(or let us know if there is something we can clarify)

yes, thanks- I need to know what I am doing wrong- as I have spent way too long on this one question and I am only half way through. I’m sorry- I am just not getting this.

what you have done wrong is that you have not used the given parameters (arguments) of the function.
This is why I suggested that you reread the exercise as they have an example of how to use the params. in the function.

if you have a question about what you have read let us know. Otherwise, you should remove the numbers you have tried to sum and instead use the parameters given to the function.

1 Like

omgosh!!!- done tysm!
I got it-

1 Like