EN
Node.js - get version programmatically (at runtime)
7 points
In this article, we would like to show how to get Node.js version programmatically.
Quick solution:
xxxxxxxxxx
1
const version = process.version;
Example index.js
file:
xxxxxxxxxx
1
console.log(process.version);
Example output:
xxxxxxxxxx
1
v16.13.0