Why do we use __filename in Node.js?



Why do we use __filename in Node.js?..

Answer / Shashi Kant Srivastava

"In Node.js, the __filename global variable contains the absolute path of the currently executing script file."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Node.js Interview Questions

What are the biggest drawbacks of node.js?

1 Answers  


What is the difference between nodejs and jquery?

1 Answers  


How can you set default node version using nvm?

1 Answers  


What are “Streams” in Node.JS?

1 Answers  


What tools can help you assure a consistent style?

1 Answers  


What is the difference between Grunt and Gulp?

1 Answers  


What we use buffer class in node.js?

1 Answers  


Name some of the events fired by streams?

1 Answers  


How to debug node.js applications?

1 Answers  


How to create an Http Server using Node.js?

1 Answers  


How we can secure http cookies against xss attacks?

1 Answers  


How to send data from node js to html?

1 Answers  


Categories