Passing Values to Functions with Arguments - welp! resolved, ta for input! :)

Tell us what’s happening:

I feel like I’ve made sure that the syntax I’m using matches that of the example but it doesn’t seem to be working. I could just be tired I guess, I feel like I’m missing something…and I know I’ll kick myself when I see it!

  1. ‘it’s not a function’
  2. the 1st of the two ‘tests’ add up to 3, but it says it doesn’t
  3. I thought in passing it arguments was what you did to call it? Have I got this wrong?

TIA! x

Your code so far


// Example
function ourFunctionWithArgs(a, b) {
  console.log(a - b);
}
ourFunctionWithArgs(10, 5); // Outputs 5

// Only change code below this line.

function functionsWithArgs(one,two) {
  console.log(one + two);
}

functionsWithArgs(1, 2);
functionsWithArgs(7, 9);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments

It looks good to me. I think you may be failing it because you are calling 2 functionWithArgs after defining them but the challenge only asks for one.

I think is not passing because the instructions state to name your function “functionWithArgs”… it looks like an extra “s” snuck into your function name. :persevere: Hope that helps!

You need to create a function called functionWithArgs, there is a small difference so you are not passing the tests because a function with that name doesn’t exist