Tell us what’s happening:
Describe your issue in detail here.
I tried every step but none of them aren’t working. I also read the hints but their aren’t also working. What is the best way to get this working?
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14324.72.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.91 Safari/537.36
Challenge: Passing Values to Functions with Arguments
Link to the challenge:
It looks like you haven’t written any code get? That definitely can’t work without any code!
Show us what you’ve tried and we can help you fix it.
Please post your code instead of a picture. Thanks.
You can’t use numbers as variables in the function definition.
function testFun(param1, param2) {
console.log(param1, param2);
}
See how the example uses variable names instead of specific values when they define the function?
functionWithArg(num1,num2){
return num1 + num2
}
console.log(functionWithArg(1,2));
it should solve your problem
note: the function name should take a parameter and not a value
That answer isn’t quite correct.
In any case, please do not post solutions. 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.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
bro sorry, i checked it using vsode it gave me 3
i mean the code
function functionWithArg(num1,num2){
return num1 + num2
}
console.log(functionWithArg(1,2));
Bro sorry, but that doesn’t match the instructions for the challenge.
thanks bro, am sorry for the mistakes