The prompt(...) part is a call to the prompt function. More specifically, a variable called prompt is not defined, so a higher scope is checked for a prompt variable. When it’s not found then the highest scope in a web browser is the window object, on which is a property called prompt. It is that prompt property that has a function, (properties that are functions are called methods), so it is that prompt method that is called.
When that prompt is complete (either by you selecting OK or Cancel) the return value from that prompt function is what you typed in, or null.
The return value from that prompt, in your code is then assigned to the age variable.
Is that the type of further info that you are after?
Some web browsers prevent against multiple of the same message, by showing a number to the left of the same message. That way when a message happens 700 times, you only see 700 to the left of the message, instead of 700 lines of the same identical message.
Just for @OBXJuggler’s info, I did run the example as per NetNinja’s setup with VSCode and Liveview. On mine, running it this way I did see multiple greetings.
If you haven’t already done so, do check out his first video where he sets up vscode and the liveview extention. Starts around the 4 minute mark.