Skip to content

Commit

Permalink
doc: provide more guidance about process.version
Browse files Browse the repository at this point in the history
PR-URL: #34909
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
  • Loading branch information
Trott authored and richardlau committed Sep 1, 2020
1 parent 4782ec7 commit fbd18be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2476,13 +2476,16 @@ added: v0.1.3

* {string}

The `process.version` property returns the Node.js version string in the form of
`v<major>.<minor>.<patch>`.
The `process.version` property contains the Node.js version string.

```js
console.log(`Version: ${process.version}`);
// Version: v14.8.0
```

To get the version string without the prepended _v_, use
`process.versions.node`.

## `process.versions`
<!-- YAML
added: v0.2.0
Expand Down

0 comments on commit fbd18be

Please sign in to comment.