Need assistance in Passing Values to Functions with Arguments

Challenge Name

Passing Values to Functions with Arguments has an issue.

Issue Description

Code is correct and I’m following all the steps mentioned in the challenge. Still its not passing the test.

Browser Information

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.112 Safari/537.36 Vivaldi/1.91.867.48.

Screenshot

Your Code



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

// Only change code below this line.
function functionWithArgs(a, b) {
  console.log(a + b);
}
functionWithArgs(10,2);


Is that all of the code you have? If so, you left off calling the function.

I tested by leaving off calling the function, and in the output box was an error message saying the function needed to be called…if you are getting that message, then that’s all you need to do for it to pass. Hope that helps!

Nope. It wasn’t that. However refreshing the browser tab and running exact same code passed the test. Don’t know the exact reason.

Wild, and my apologies, I see now that you did call the function.

Glad you got it working though, thanks for the update!

Same here. But refreshing the browser does not help. Here’s my code :

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

// Only change code below this line.
function functionWithArgs(a,b){
  console.log(a + b);
}
functionWithArgs(12,56);

Any suggestions?