I’m don’t understand what you mean. I’m a beginner.
I’m trying to work out the difference between
The top paragraph which is code I have typed. If I type a number in the prompt it returns it as undefined. (I’m trying to make it return a number)
and
The code I have pasted from a tutorial which is returning a number.
The code you posted had a gap between the name of the function (prompt) and the brackets used to call it: that would have caused the result to be undefined.
That isn’t the case in the screenshot, where the reason it’s doing it is to do with the thing highlighted as an error with a red squiggle under it in the code