Passing Values to Functions with Arguments - cannot submit

Passing Values to Functions with Arguments - cannot submit
0.0 0

#1

Hi ,

I can’t seem to “submit” my code

After clicking on “Run the Tests” button, nothing happens.

DOes anyone encounter the same issue?

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

// Only change code below this line.

functionWithArgs(x, y) {
console.log(x + y);
}
functionWithArgs(1, 2);


**Your browser information:**

User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36</code>.

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

#2

hey there is a bug in your code, thats why its not running. You have written -

functionWithArgs(x, y) {
console.log(x + y);
}

It should be -

function functionWithArgs(x, y) {
console.log(x + y);
}

you missed the function keyword


#3

Hey skalam02 ! Thanks for pointing out! It really helps!