Basic JavaScript - Passing Values to Functions with Arguments

Tell us what’s happening:
Describe your issue in detail here.
it took me many hours to finish this challenge. this is what i ended up doing based on a video i watched:
function functionWithArgs(one, two) { console.log(one + two); }

functionWithArgs(3, 16);

Although this worked, i really do not understand how and what bearing it has with the examples given earlier before the challenge. i need a clearer explanation of this section please.

Your code so far

function functionWithArgs(one, two) { console.log(one + two); }
functionWithArgs(3, 16);

Your browser information:

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

Challenge: Basic JavaScript - Passing Values to Functions with Arguments

Link to the challenge:

That’s a strange answer the video gave you. I wouldn’t use those videos.

Your solution written normally:

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

The example from the challenge:

function testFun(param1, param2) {
  console.log(param1, param2);
}

Those two should look really, really similar, but with a + instead of a ,

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