Now we see the process example to print current working directory and uptime of the process.
File: processexample3.js
console.log(`Current directory: ${process.cwd()}`);
console.log(`Uptime: ${process.uptime()}`);
Now open the Node.js command prompt run the below code:-
node processexample3.js