1.What is the primary benefit of using Node.js for backend development?
- 1.It uses Python for all operations.
- 2.It has a wide range of frameworks like Laravel.
- 3.It easily integrates with front-end frameworks.
- 4.It handles multiple concurrent connections efficiently using non-blocking I/O. ✓
2.Which of the following modules in Node.js is primarily used for handling file operations?
- 1.http
- 2.events
- 3.fs ✓
- 4.url
3.Node.js is built on which Javascript engine?
- 1.SpiderMonkey
- 2.JavaScriptCore
- 3.Chakra
- 4.V8 ✓
4.What command is used to install a package globally in Node.js?
- 1.npm install [package-name]
- 2.node install -g [package-name]
- 3.npm install -p [package-name]
- 4.npm install -g [package-name] ✓
5.Which of the following is used to write asynchronous code in Node.js more manageably?
- 1.Promises ✓
- 2.Callbacks exclusively
- 3.Events
- 4.Synchronism
6.Which method is used to create a server in Node.js?
- 1.createSocket
- 2.listen
- 3.createServer ✓
- 4.connect
7.Which of these is an event-driven framework used with Node.js to facilitate asynchronous programming?
- 1.Express
- 2.Hapi
- 3.Async.js ✓
- 4.Socket.io
8.How does Node.js achieve high throughput?
- 1.By compiling code ahead of time.
- 2.Using multi-threading naturally.
- 3.By using a single-threaded event loop to manage multiple I/O operations asynchronously. ✓
- 4.By forcing synchronous execution of functions.
9.Which module would you use in Node.js to create a web server?
- 1.http ✓
- 2.websocket
- 3.tcp
- 4.dns
10.What is the purpose of 'npm shrinkwrap'?
- 1.To shrink the size of node_modules.
- 2.To cache commonly used modules.
- 3.To bundle project files for deployment.
- 4.To lock down the versions of a project's node dependencies. ✓