JavaScript Question from me

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

The only “X” I get is that functionWithArgs(1,2) should output 3 .

How am I able to accomplish that? Thank you!

  **Your code so far**

functionWithArgs(1 + 2);

function functionWithArgs() {
console.log(1 + 2);
console.log(7 + 9);
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36

Challenge: Passing Values to Functions with Arguments

Link to the challenge:

You need to write a function that has two arguments.

Currently your function has zero arguments.

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

syntax for writing function is

function functionName(parameters){
                // your code 


example :


It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

where i give exact answer i just give a random example so he or she can understand

You gave a function that takes two parameters and prints their sum to the console. That is exactly what the challenge is telling the user to create.

Please do not give solutions. Thank you.

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