Write Reusable JavaScript with Functions-N

Tell us what’s happening:
Describe your issue in detail here.
function functionWithArgs(one, two) {

console.log(one + two);

}
I don’t know how to call functionWithArgs with two numbers after you define it.
Is there anyone who could help me please ?

Your code so far



Your browser information:

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

Challenge: Write Reusable JavaScript with Functions

Link to the challenge:

In JS, you call a function like this:

myFunction();

The parentheses at the end tell JS that you are not referencing it but are actually calling it.

That is a function without parameters. For your function, you need to send it parameters. Those are placed inside the parentheses, separated by commas:

functionWithArgs(1, 2);

If your function is written correct, that should log out “3” to the console.

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