mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
doc: provide more guidance about process.version
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
4782ec7b3b
commit
fbd18be459
1 file changed
+5
-2
+5
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user