how delete a folder using nodejs code example
Example 1: delete dir nodejs
fs.rmdirSync(dir, { recursive: true });
Example 2: how to delete a folder using node js
fs.unlink('./node/myText.txt',function(){
fs.rmdir('node');
});
fs.rmdirSync(dir, { recursive: true });
fs.unlink('./node/myText.txt',function(){
fs.rmdir('node');
});