Issue's running my test

Currently working on Passing Values to Functions with Arguments. When I go to run my test nothing happens, and if I go to reset the code it goes blank. I’ve done a hard refresh and am still facing the same issue.
Have been stuck on this problem for over a week with no resolve.https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments

my code:

function functionWithArgs(1,2) {

    console.log(1+2),

}

functionWithArgs(1,2),

function functionWithArgs(a,b) {

    console.log(a+b),

}

   functionWithArgs(1,2);

    functionWithArgs(7,9);

Im not sure how far off my code is since i haven’t had a chance to run my test

Please provide your code and a link to the challenge.

I updated my post, thanks

This code is not working because your syntax is invalid.

You cannot end a line with a ,. You need to use a ;.

You should only declare your function once, with the arguments a and b.


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like