I’m not sure what you mean. FCC didn’t “get this final result”. Your browser calculated it using JavaScript and math.
One issue I see, you have:
console.log(processArg)
That will log out the function itself. I assume that you want the result. You can either do:
console.log(processed)
or
console.log(processArg(7))
to see the answer.
If you want to understand how that happens, that number 7 is passed into that function and is accepted as the first parameter, and we tell the function to call it “num” (inside the function). Then we do our math and return the value.
If that didn’t answer your question, please ask a specific question.
It looks like there is some confusion on how function calls work.
Let’s walk through the problem.
We have this function here
and the only thing that the function does is return a value based on this mathematical equation.
This part here is the parameter
Parameters are placeholders for the real value when we call the function later on.
This part here is our function call
Function calls use the name of the function and pass in a real value.
We could have used any number here.
But in this case we are using the number 7 in our function call.
What happens now, is that the number 7 will be used in this mathematical equation.
(num + 3) / 5
can be written as
(7 + 3) / 5
If we do the math out then we have this result
(10)/5 equals 2
This function call processArg(7) will return the number 2.
The last part is that we are assigning the number 2 to this variable here called processed
processed = processArg(7)
this can be rewritten as
processed = 2
If you console.log(processed) then you should the number 2 in the console.