Concept Flow - Output using console.log
Start Program
Execute console.log()
Print message to Console
Continue or End Program
The program starts, runs console.log() to print a message, then continues or ends.
console.log('Hello, world!');
| Step | Code Executed | Console Output | Program State |
|---|---|---|---|
| 1 | console.log('Hello, world!'); | Hello, world! | Printed message to console |
| 2 | End of code | Program ends |
| Variable | Start | After Step 1 | Final |
|---|---|---|---|
| No variables | N/A | N/A | N/A |
console.log(message) - Prints message to the console - Used for showing output or debugging - Does not change variables - Each call prints on a new line - Runs immediately when executed