Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 494594e

Browse files
Trottaddaleax
authored andcommittedSep 22, 2020
doc: provide more guidance about process.version
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]>
1 parent b76affd commit 494594e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎doc/api/process.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -2445,13 +2445,16 @@ added: v0.1.3
24452445

24462446
* {string}
24472447

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

24512450
```js
24522451
console.log(`Version: ${process.version}`);
2452+
// Version: v14.8.0
24532453
```
24542454

2455+
To get the version string without the prepended _v_, use
2456+
`process.versions.node`.
2457+
24552458
## `process.versions`
24562459
<!-- YAML
24572460
added: v0.2.0

0 commit comments

Comments
 (0)
Please sign in to comment.