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 () {console.log(1+2, 7+9);

```were i made mistake

What are you trying to do here? Your function doesn’t accept arguments and you called the same function twice.

The function should have two arguments:

function nameOfTheFunction(arg1, arg2) {
   here you should make a statement that prints the sum of `arg1 + arg2` in the console - (the console.log() method outputs a message to the web console)

Then, you should call that function with two numbers as arguments:

for example: nameOfTheFunction(2, 4);

The console will show the number 6.

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