How we can delete a file in node js?
Answer / Dharmendra Kumar Mourya
You can delete a file in Node.js using the `fs` module's `unlinkSync()` function. Example: `const fs = require('fs'); fs.unlinkSync('<path_to_file>')`.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a callback in node.js?
What is error-first callback?
Is node js a backend language?
What language is node js written in?
What ides you can use for node.js development?
Using the event loop what are the tasks that should be done asynchronously?
Why do we need promises in node js?
What are the exit codes in node.js? Can you list a few exit codes?
How to get started with node.js?
Explain node.js web application architecture?
What is the use of net.Socket in Node.js?
What is the passport in Node.js?