Basic JavaScript - Passing Values to Functions with Arguments

Tell us what’s happening:
Describe your issue in detail here.
I am confused after this step. Please enlighten me with the next step.
Your code so far

function functionWithArgs(one, two){
  console.log(1 + 2),
  }
functionWithArgs(1, 2);

Your browser information:

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

Challenge: Basic JavaScript - Passing Values to Functions with Arguments

Link to the challenge:

To use arguments within function, you have to use its names, not valuse.
In your examplet you added 1+2 in the funcion, when there are value u use in the last line.
You can call this function with (1, 2) as with ony other two number - for ex. (10, 5) → in that case your code won’t work. You have to add names (one + two) instead of value in the function to be able to add different numbers using that function.

Thank you for the reply

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