javascript
Input/Output in JavascriptjavascriptLevel1
Progress0%
Contents
Input/Output in Javascript
1 / 8
Introduction
Basic Input / Output — console.log, prompt
Input and output (I/O) are the most fundamental operations in any program. Input is data the program receives. Output is data the program sends out — to the screen, console, or another system.
In JavaScript, the basic I/O tools differ depending on the environment:
| Environment | Output | Input |
|---|---|---|
| Browser | console.log, alert | prompt, confirm |
| Node.js | console.log | process.stdin, readline module |