Basic JavaScript - Passing Values to Functions with Arguments

Tell us what’s happening:
Describe your issue in detail here.
i dont know what the proiblem is, how can i call the function once
Your code so far

 function functionWithArgs (a, b){
   console.log(a + b, a + b);
 }
 funtionWithArgs((1,2), (7,9)); // Outputs 5

// Only change code below this line.

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) 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:

it kind of looks like you have defined 2 functions?

You only need one.

how do i do that.

i have tried othe rmethods

functionname(a,b) is how you do it

function functionWithArgs (a, b){
console.log(a + b);
}
funtionWithArgs(1,2); // Outputs 5

// Only change code below this line.

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

Everytime you write

function somename(parameters)

you are declaring a new function

Look at your code. How many function declarations did you make?

like this one below

2 i gues so

i will i make it one

function functionWithArgs (a, b){
console.log(a + b);
}
funtionWithArgs(1,2); // Outputs 5

// Only change code below this line.

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

I’m sorry that is still wrong.

Perhaps you would benefit from reading a longer explanation

function functionWithArgs (a, b){
console.log(a + b);
}
funtionWithArgs(1,2);
funtionWithArgs(7,9);
is still not corresponding

figured it out thanks so much

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