Values to Functions with Arguments

Tell us what’s happening:

What am i doing wrong?!? I can’t for the life of me figure this one out…help!!

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 testFun(a, b) {
  console.log(a - b);
}
ourFunctionWithArgs(1,2);

ourFunctionWithArgs(7,9);```
**Your browser information:**

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

**Link to the challenge:**
https://www.freecodecamp.org/challenges/passing-values-to-functions-with-arguments

What do the failing tests say?

It doesn’t look like you actually ever call the function testFun

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

// Only change code below this line.
function testFun(a, b) {
  console.log(a - b);
}
ourFunctionWithArgs(1,2);

ourFunctionWithArgs(7,9);

so is it this but instead of ourFunctionWith Args it should be testFun? so confused

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

markdown_Forums

ourFunctionWithArgs(1,2) will run the example function ourFunctionWithArgs with the arguments 1 and 2.
If you want to run the function testFun, then you need to call it.

this still is not making any sense

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

// Only change code below this line.
function ourFunctionWithArgs(a, b) {
console.log( - b);
}
ourFunctionWithArgs(1,2);

ourFunctionWithArgs(7,9);

ourFuntionWithArgs();
‘’’
first one is checked off, the rest and marked wrong what am i doing wrong???

Why did you change the name of your function?

because neither one was showing up right…
can this be explained in the simplest of terms so i can understand it?
How did you pass this one?

Functions have names. Functions only run when you call them using their names.

function theFunctionName(whatever) {
    whatever
}

doesn’t do anything unless you call it

theFunctionName(something);