Functions & Reuse: Why Your Function "Returns Nothing"
Showing a value from inside a function and sending it back out are two different things. Only one of them lets the caller use it.
The Functions & Reuse set asks for an action that hands a value back, not one that just displays it. The trap is writing an action that SHOWs -- or print()s, or console.log()s -- the answer from inside itself, which looks like it worked because the right number appears on screen, and then discovering that anything trying to use the result gets nothing usable at all.
Press Run to see what your code does.
That logs 8 first -- so it looks fine -- and then "result is: undefined", because double never used return. Falling off the end of a function without a return statement hands the caller undefined in JavaScript, None in Python, and an equivalent nothing-value in pseudocode, in every case silently, no error. The fix is return n * 2; instead of logging it inside the function, and letting the caller decide whether to console.log() the result, use it in more math, or pass it somewhere else. A function that prints its own answer can only ever be used once, in exactly the way it was written; a function that returns its answer can be used anywhere a value is expected.
Everything above runs in this page, on your own machine. There is more of it on the practice pages.