processed = processed +2;
You should assign processArg() to processed. idk how to do this
processed = processed +2;
You should assign processArg() to processed. idk how to do this
Can you give us a link to the challenge?
OK, I found the challenge:
Assignment with a Returned Value
In the future, always include a link. Even better, use the Get Help button to create a post in here and it will automatically include a link to the challenge and your code in a properly formatted manner.
“Call the processArg function with an argument of 7 and assign its return value to the variable processed.”
You “call” a function by invoking the function name with parentheses after it. And then you pass the values into the function in between those parentheses. That’s what you need to do here. And then the value that the function call returns should be assigned to the variable processed.
// ConfiguraciĂłn
let processed = 0;
function processArg(num) {
return (num + 3) / 5;
}
// Cambia solo el cĂłdigo debajo de esta lĂnea
processed = processed +2;
“Call the processArg function with an argument of 7 and assign its return value to the variable processed.”
processArg(7){
return… idk how to do this assignment of the result value
}
// ConfiguraciĂłn
let processed = 0;
function processArg(num) {
return (num + 3) / 5;
}
// Cambia solo el cĂłdigo debajo de esta lĂnea
processed = processed +2;
-----------processed = processArg()---------------???;
Now the previous part that was correct is now wrong too
Yes, this is how you “call”, or invoke a function, by putting parentheses after the function name. And you are assigning the value returned by the function to the variable processed correctly. But you have forgotten one thing:
“Call the processArg function with an argument of 7…”
You need to pass the value 7 into the processArg function.