mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-09 12:57:45 +00:00
Added image output to article
This commit is contained in:
BIN
content/blog/how-to-use-npm/hello-js.png
Normal file
BIN
content/blog/how-to-use-npm/hello-js.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
@@ -207,7 +207,7 @@ From here, you can type in JavaScript code, and hit "enter" to execute:
|
||||
> console.log("Hello")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
This view of Node - where you have an interactive terminal you can type code into - is known as the REPL.
|
||||
|
||||
@@ -235,7 +235,7 @@ if (randomNumber > 75) {
|
||||
|
||||
Then, in your terminal, `cd` into the directory the `index.js` file is and run `node index.js`. It will run the code and execute a `console.log` and exit immediately after.
|
||||
|
||||

|
||||

|
||||
|
||||
This particular program will automatically exits Node once it's completed running, but not all do. Some programs, like the following, may run until manually halted:
|
||||
|
||||
|
||||
BIN
content/blog/how-to-use-npm/output-js.png
Normal file
BIN
content/blog/how-to-use-npm/output-js.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
Reference in New Issue
Block a user