Passing values to function with argument

Tell us what’s happening:

I don’t know why I’m not able to pass the last test, please help.

Your code so far


function functionWithArgs(param1, param2) {
 console.log(param1+param2);
function functionWithArgs() {
   console.log(1, 2);
 }

}

functionWithArgs("1",  "2");
functionWithArgs("7",  "9");
functionWithArgs();


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36.

Challenge: Passing Values to Functions with Arguments

Link to the challenge:

Hello~!

You should call function functionWithArgs with two numbers after you define it.

You are calling it with two strings. :slight_smile:

please i need a response,

Did you fix this bug yet @Kolaaaa?

1 Like

oh! thanks. but i don’t totally get that.

You have strings

"1"

You need numbers

1

When you put quotes " around a number, it no longer acts like a number but instead acts like a string.

1 Like

wow! I can’t believe that’s what got me stuck. Thank you so much.

1 Like