Trouble solving the Parameters

Tell us what’s happening:
Anyone please help!

Your code so far


function functionWithArgs() {
console.log()
}
functionWithArgs(3, 16);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 Edg/86.0.622.69.

Challenge: Passing Values to Functions with Arguments

Link to the challenge:

You have forgotten to add arguments, called param1 and param2 below.

function testFun(param1, param2) {
  console.log(param1, param2);
}

You need two arguments, which you add together inside the function.

Tell us what’s happening:

I have no idea where i’m going wrong

Your code so far


function functionWithArgs(param1, param2) {
console.log(param1, param2);
}
functionWithArgs(3, 16);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 Edg/86.0.622.69.

Challenge: Passing Values to Functions with Arguments

Link to the challenge:

So you need to add param1 to param2

The addition happens here. Keep the console.log part

I had a lot of trouble with functions in the beginning. They can be very confusing at first. I drew a picture that I think would have helped me early on. I hope it helps you.

2 Likes