its Work in the same way as a Sleep() function used by a cpp file.
Use the package manager npm or yarn to install SleepCpp.
yarn add sleepcpp
npm install sleepcpp
const sleep = require("sleepcpp");
console.log("before");
sleep(4000);
console.log("after 4 seconds");
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.