W3Tutorials.net
Toggle Menu
Home
Online Go Compiler
Tutorials
Javascript Tutorials
Python Tutorials
Go Tutorials
Blog
All Posts
Node.js Fundamentals
See how well you know Node.js runtime and core modules.
1. What is the primary role of the Node.js event loop?
Compiling JavaScript code
Handling asynchronous operations
Managing database connections
Rendering HTML content
2. Which of the following are core features of Node.js?
Non-blocking I/O
Single-threaded architecture
Multi-threaded by default
Event-driven programming
3. Node.js runs in the browser environment by default.
True
False
4. What does 'npm' stand for?
5. Which built-in module is used for file system operations in Node.js by default?
fs
file
system
path
6. Which are valid ways to export a module in CommonJS (Node.js default module system)?
module.exports
exports
export default
export const
7. The 'require' function in Node.js loads modules synchronously.
True
False
8. What global object in Node.js is similar to the browser's 'window' object?
9. What does the __dirname variable return in a Node.js script?
Current working directory
Absolute path of the current script's directory
Absolute path of the current script file
Project root directory
10. Which 'fs' module methods are asynchronous (non-blocking)?
fs.readFile
fs.readFileSync
fs.writeFile
fs.writeFileSync
11. Node.js is built on the V8 JavaScript engine developed by Google.
True
False
12. What function schedules a callback to run after a specified delay (in milliseconds)?
13. Which method starts an HTTP server listening for incoming requests?
createServer
listen
connect
start
14. Which are global objects in Node.js?
global
process
window
console
15. ES6 modules (import/export) are enabled by default in Node.js without configuration.
True
False
Reset
Answered 0 of 0 — 0 correct