node js interview questions
What is Node.js? What is it used for?
Q2. What is Event-driven programming?
Q3. What is Event loop in Node.js work? And How does it work?
Q4. What is REPL in Node.js?
Q5. What is the purpose of module.exports in Node.js?
Q6. What is the difference between Asynchronous and Non-blocking?
Q7. What is Tracing in Node.js?
Q8. How will you debug an application in Node.js?
Q9. Difference between setImmediate() vs setTimeout()
Q10. What is process.nextTick()
vent loop continues.
Q11. What is package.json? What is it used for?
Q12. What is libuv?
libuv is a multi-platform support library with a focus on asynchronous I/O. It was primarily developed for use by Node.js, but it’s also used by Luvit, Julia, pyuv, and others.
Some of the features of libuv are:
Full-featured event loop backed by epoll, kqueue, IOCP, event ports.
Asynchronous TCP and UDP sockets
Asynchronous file and file system operations
File system events
Q13. What are some of the most popular modules of Node.js?
There are many most popular, most starred or most downloaded modules in Node.js. Some of them are:
Q14. What is EventEmitter in Node.js?
All objects that emit events are instances of the EventEmitter class. These objects expose an eventEmitter.on() function that allows one or more functions to be attached to named events emitted by the object.
When the EventEmitter object emits an event, all of the functions attached to that specific event are called synchronously.