Unlike most programming languages, JavaScript has no concept of input or output.

there is a sentence

in MDN
May.10,2022

it is a scripting language that runs in the host environment (host environment), and any mechanism for communicating with the outside world is provided by the host environment.
The sentence that follows

has already been explained. If you want to be more specific, you can take a look at the following example.

for Java :

console.log('Hello World')
If you don't give it the host environment (browser, Node.js ), you can't see this output anywhere (outside).

Menu