| 1 | What is a shebang line, and why does it need to be the first line of an executable Node.js CLI script? Node.js › CLI Tools & Scripting with Node.js | Node.js | CLI Tools & Scripting with Node.js | Beginner |
| 2 | How would you parse command-line arguments and flags in a Node.js CLI tool using a library like commander or yargs? Node.js › CLI Tools & Scripting with Node.js | Node.js | CLI Tools & Scripting with Node.js | Intermediate |
| 3 | How do you correctly set an exit code from a Node.js CLI script to signal success or failure to the calling shell or CI pipeline? Node.js › CLI Tools & Scripting with Node.js | Node.js | CLI Tools & Scripting with Node.js | Intermediate |
| 4 | How do you write cross-platform shell scripts in Node.js that work identically on Windows, macOS, and Linux? Node.js › CLI Tools & Scripting with Node.js | Node.js | CLI Tools & Scripting with Node.js | Intermediate |
| 5 | How would you build an interactive CLI wizard that prompts the user for multiple pieces of input using a library like Inquirer.js? Node.js › CLI Tools & Scripting with Node.js | Node.js | CLI Tools & Scripting with Node.js | Advanced |
| 6 | What is the difference between require() (CommonJS) and import (ES Modules) when loading Node.js's own core modules? Node.js › Core Node.js Modules | Node.js | Core Node.js Modules | Beginner |
| 7 | How does Node.js's built-in test runner (node:test) compare to third-party frameworks like Jest or Mocha? Node.js › Advanced Node.js | Node.js | Advanced Node.js | Advanced |
| 8 | What are Node.js Single Executable Applications (SEA), and what are their current limitations? Node.js › Advanced Node.js | Node.js | Advanced Node.js | Advanced |
| 9 | How would you recursively read all files within a directory tree in Node.js? Node.js › File System & File Processing | Node.js | File System & File Processing | Intermediate |
| 10 | How would you implement a directory-size calculator in Node.js that recursively sums the size of all files within a directory tree? Node.js › File System & File Processing | Node.js | File System & File Processing | Advanced |
| 11 | What does the node:os module provide, and what are some commonly used functions from it? Node.js › Core Node.js Modules | Node.js | Core Node.js Modules | Beginner |
| 12 | What does the node:path module provide, and why should you always use it instead of manually concatenating file path strings? Node.js › Core Node.js Modules | Node.js | Core Node.js Modules | Intermediate |
| 13 | What does the node:readline module provide, and what is a common use case for it? Node.js › Core Node.js Modules | Node.js | Core Node.js Modules | Intermediate |
| 14 | What is the difference between an absolute path and a relative path in Node.js, and how does __dirname help resolve paths reliably? Node.js › File System & File Processing | Node.js | File System & File Processing | Beginner |
| 15 | What is the difference between fs.unlink() and fs.rmdir() (or the newer fs.rm()) in Node.js? Node.js › File System & File Processing | Node.js | File System & File Processing | Beginner |
| 16 | What are the four main methods for creating a child process in Node.js, and how do they differ? Node.js › Child Processes & Process Management | Node.js | Child Processes & Process Management | Beginner |
| 17 | What is the process object in Node.js, and what are some of the most commonly used properties and methods on it? Node.js › Global Objects & the process Object | Node.js | Global Objects & the process Object | Beginner |
| 18 | What is the difference between synchronous and asynchronous versions of the same core Node.js API, using fs.readFile vs fs.readFileSync as an example, and when is the synchronous version actually appropriate? Node.js › Event Loop & Non-blocking IO | Node.js | Event Loop & Non-blocking IO | Intermediate |
| 19 | How would you pipe the output of one child process directly into the input of another, replicating a shell pipeline in Node.js? Node.js › Child Processes & Process Management | Node.js | Child Processes & Process Management | Intermediate |
| 20 | How would you implement a file-watching feature in Node.js using fs.watch(), and what are its known cross-platform limitations? Node.js › File System & File Processing | Node.js | File System & File Processing | Advanced |
| 21 | What is the difference between path.join() and path.resolve(), and when would you use each? Node.js › Path & OS Modules | Node.js | Path & OS Modules | Beginner |
| 22 | What does path.parse() and path.format() do, and how are they useful for decomposing and reconstructing file paths? Node.js › Path & OS Modules | Node.js | Path & OS Modules | Beginner |
| 23 | What is a database seed script, and how does it differ from a migration? Node.js › Databases | Node.js | Databases | Intermediate |
| 24 | What is the difference between fs.stat() and fs.lstat(), and when does the distinction matter? Node.js › File System & File Processing | Node.js | File System & File Processing | Intermediate |
| 25 | What is the purpose of the 'flag' option in fs.writeFile(), and what's the difference between 'w', 'a', and 'wx' flags? Node.js › File System & File Processing | Node.js | File System & File Processing | Intermediate |
| 26 | What is the purpose of an npm 'scripts' section in package.json, and how do custom scripts standardize common project tasks across a team? Node.js › Git & Project Management | Node.js | Git & Project Management | Intermediate |
| 27 | How do you safely watch a directory or file for changes using fs.watch(), and what are its known cross-platform limitations? Node.js › File System (fs) Module | Node.js | File System (fs) Module | Intermediate |
| 28 | How would you use the node:os module to make a script's behavior adapt correctly across different operating systems? Node.js › Path & OS Modules | Node.js | Path & OS Modules | Intermediate |
| 29 | What is the 'detached' option when spawning a child process, and when would you use it? Node.js › Child Processes & Process Management | Node.js | Child Processes & Process Management | Advanced |