Skip to content

Commit 09e23b8

Browse files
committed
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 b01d314 commit 09e23b8

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
@@ -2498,13 +2498,16 @@ added: v0.1.3
24982498

24992499
* {string}
25002500

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

25042503
```js
25052504
console.log(`Version: ${process.version}`);
2505+
// Version: v14.8.0
25062506
```
25072507

2508+
To get the version string without the prepended _v_, use
2509+
`process.versions.node`.
2510+
25082511
## `process.versions`
25092512
<!-- YAML
25102513
added: v0.2.0

0 commit comments

Comments
 (0)