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 <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
Trott authored and addaleax committed Sep 22, 2020
1 parent f50fec6 commit 1b27f09
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 @@ -2445,13 +2445,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 1b27f09

Please sign in to comment.