How does the post increment operator work in a return statement of a function? Let say
function foo(n) {return n++}
If the return statement ends the function execution and returns n, then when does the increment of n happen? I suppose that n is incremented before the return statement. If so, then how does Javascript know to return n instead of n + 1;