- Passing Values to Functions with Arguments - what's wrong here..bug?

- Passing Values to Functions with Arguments - what's wrong here..bug?
0

#1

Tell us what’s happening:

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

Your browser information:

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

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


#2

Could be because you’re calling the function twice. Just call it once

“Call the function with two numbers as arguments.”


#3

I think that there may actually be a bug here. There was an update recently (today? last night?)

Bugs should always be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.


#4

What ever is causing this problem is also affecting a couple of other challenges. I looked at the tests being ran and they have changed the syntax of the tests and seems like it is breaking the challenges where the function is required to console.log something (vs. returning something).


#5

Seems to be happening in several challenges


#6

I called it once. Same issue
// 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(1,2);