There is something that is confusing me, when i run this code it seems to work. What i don’t understand is why it works as i suspected we need to call the variable processed, is this
because of the return statement?
For the tests to run, that’s just what it’s asking you to do (assign that value to the variable processed).
In JavaScript, variable assignment only returnsundefined. As a side effect, the value on the right hand side is assigned to the variable name on the left hand side. So processed = processedArg(7) is not going to return the value of processedArg(7). The value of processedArg(7) (which is 2) has been assigned to the variable processed. So to see what it is, you have to look at processed