Skip to content

Commit fbd18be

Browse files
Trottrichardlau
authored andcommitted
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 4782ec7 commit fbd18be

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

24772477
* {string}
24782478

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

24822481
```js
24832482
console.log(`Version: ${process.version}`);
2483+
// Version: v14.8.0
24842484
```
24852485

2486+
To get the version string without the prepended _v_, use
2487+
`process.versions.node`.
2488+
24862489
## `process.versions`
24872490
<!-- YAML
24882491
added: v0.2.0

0 commit comments

Comments
 (0)