Basic JavaScript - Passing Values to Functions with Arguments

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

  **Your code so far**
function functionWithArgs(number1, number2, number7, number9){ 
console.log((1+ 2), 
(7+9));
} 

functionWithArgs(1, 2),(7, 9);  


  **Your browser information:**

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

Challenge: Basic JavaScript - Passing Values to Functions with Arguments

Link to the challenge:

  1. Create a function called functionWithArgs that accepts two arguments and outputs their sum to the dev console.
  2. Call the function with two numbers as arguments.

  • Passed:functionWithArgs should be a function.

  • Passed:functionWithArgs(1,2) should output 3.

  • Failed:functionWithArgs(7,9) should output 16.

  • Passed:You should call functionWithArgs with two numbers after you define it.

***Need Help Thanks A Million

We can read the requirements ourselves - we need to know what specifically you don’t understand so we can better help you.

You are never using the function arguments. Also, you created a function that takes 4 arguments instead of 2.

Thankyou for the help I figured it out

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