I keep doing this and it gives me the same result

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function functionWithArgs(a,b){
console.log(1+2);
console.log(7+9)
}
functionWithArgs();
  **Your browser information:**

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

Challenge: Passing Values to Functions with Arguments

Link to the challenge:

Thats because you are hard coding 1+2 and 7+9 in your function. You need to use the function parameters inside your function to use the values passed as arguments. So if you called functionWithArgs(4,3) the parameter a would hold 4, and b would hold 3. You can then add those together and get the correct result.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.