W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
29 questions for “CLI Tools & Scripting with Node.js”
Found in 1 field. Select a question to see its full answer.
Matching topics
Node.js
CLI
Tools
&
Scripting
with
Node.js
5
Node.js
Core
Node.js
Modules
4
Node.js
Advanced
Node.js
2
Information Technology
29 questions in 1 technology
#
Question
Technology
Topic
Level
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
with
in 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
with
in a directory tree?
Node.js › File System & File Processing
Node.js
File System & File Processing
Advanced
Show all 29 questions in Information Technology