Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ false
>
```

Note the difference in the outputs of the above two lines. The Node REPL printed `undefined` after executing `console.log()`, while on the other hand, it just printed the result of `5 === '5'`. You need to keep in mind that the former is just a statement in JavaScript, and the latter is an expression.
Please note the difference in the outputs of the above two lines. The Node REPL printed undefined after executing console.log(), while it simply printed the result of 5 === '5'. Keep in mind that the former is a function call expression in JavaScript, and the latter is a comparison expression. Both are expressions, but console.log() primarily produces side effects (outputting content) and returns undefined, whereas the comparison expression directly returns a boolean result.

In some cases, the code you want to test might need multiple lines. For example, say you want to define a function that generates a random number, in the REPL session type in the following line and press enter:

Expand Down