To change working directory in my current shell context when running Node.js script, we call the process.chdir
method.
For instance, we write
const process = require("process");
process.chdir("../");
to call the process.chdir
method to go up one directory level.