Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function functionWithArgs() {
console.log(1 + 2);
}
functionWithArg(1,2);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Challenge: Passing Values to Functions with Arguments
Link to the challenge:
Estoy trabada en este desafio. pasar valores a funciones con argumentos
hi, here are two issues:
- when you call the function you call
functionWithArg(1,2);
instead of functionWithArgs(1,2);
- the request is:
- Create a function called
functionWithArgs
that accepts two arguments and outputs their sum to the dev console.
so you should pass two arguments inside the function, like this:
function functionWithArgs(param1, param2) {
//your code
}
system
Closed
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.