OpenJS Node.js Application Developer (JSNAD) — Questions and Answers
Question 1: What is middleware in Express.js?
- A database layer between the application and storage
- Software installed between the client browser and the server hardware
- CSS libraries that sit between HTML and JavaScript
- Functions that have access to the request, response, and next function in the application's request-response cycle (Correct answer)
Correct answer: Functions that have access to the request, response, and next function in the application's request-response cycle
Express middleware functions execute during the request-response cycle, accessing the request object, response object, and calling next() to pass control to the next middleware.
Question 2: What is CORS and how is it handled in Express?
- Cross-Origin Resource Sharing — a security mechanism configured via the 'cors' middleware package (Correct answer)
- A database connection pooling library
- A CSS rendering optimization for server-side rendering
- A caching strategy for reducing server load
Correct answer: Cross-Origin Resource Sharing — a security mechanism configured via the 'cors' middleware package
CORS is a browser security mechanism that restricts cross-origin HTTP requests. In Express, the 'cors' middleware package configures appropriate headers to allow or restrict cross-origin access.
Question 3: What is the purpose of package-lock.json?
- To lock the project so no new packages can be added
- To prevent unauthorized access to the package registry
- To store encrypted passwords for npm registry access
- To lock the exact versions of all installed dependencies and their sub-dependencies (Correct answer)
Correct answer: To lock the exact versions of all installed dependencies and their sub-dependencies
package-lock.json records the exact version of every installed package and its dependency tree, ensuring consistent installations across different environments and machines.
Question 4: In Node.js object mode streams, what type of data can be passed as a chunk?
- Fixed-size byte chunks only
- UTF-8 encoded strings only
- Only JSON-serializable data structures
- Any JavaScript value including objects, arrays, and primitives (Correct answer)
Correct answer: Any JavaScript value including objects, arrays, and primitives
Object mode removes the Buffer/string restriction, allowing streams to work with arbitrary JavaScript values such as parsed objects or database rows.
Question 5: What is the effect of setting `"private": true` in package.json?
- Enables scoped package resolution
- Prevents the package from being accidentally published to the npm registry (Correct answer)
- Restricts install to private networks only
- Hides the package from npm search
Correct answer: Prevents the package from being accidentally published to the npm registry
`"private": true` causes `npm publish` to refuse to publish the package, protecting internal projects.
Question 6: What is the importance of data security in Node.js digital applications?
- Protecting sensitive information from unauthorized access, breaches, and loss is essential (Correct answer)
- Security slows down work
- Only financial data needs protection
- Security is unnecessary for professional data
Correct answer: Protecting sensitive information from unauthorized access, breaches, and loss is essential
This is fundamental to Node.js practice. Protecting sensitive information from unauthorized access, breaches, and loss is essential represents the professional standard for technology in the Node.js certification framework.
Question 7: Which approach reflects professional rate-limiting competency in a public-facing Node.js API?
- Allow unlimited requests from any IP to maximize availability
- Implement rate limiting per IP or API key using middleware like express-rate-limit, with clear 429 responses (Correct answer)
- Require users to wait 1 second between requests enforced client-side only
- Block all requests after the server reaches 50% CPU usage
Correct answer: Implement rate limiting per IP or API key using middleware like express-rate-limit, with clear 429 responses
Server-side rate limiting protects against abuse and DDoS while providing clear feedback via HTTP 429 responses.
Question 8: Which approach correctly handles async errors in an Express route in Express 4?
- Adding .catch() only at the server level
- Using process.on('uncaughtException')
- Wrapping the handler in try/catch and calling next(err) (Correct answer)
- Setting app.set('async', true)
Correct answer: Wrapping the handler in try/catch and calling next(err)
In Express 4 async handlers, try/catch with next(err) routes the error to Express error middleware since rejected promises are not caught automatically.
Question 9: What problem does `jest.useFakeTimers()` solve in unit tests?
- It replaces `setTimeout`, `setInterval`, and `Date` with controllable fakes so time-dependent code can be tested synchronously (Correct answer)
- It mocks the system clock only for database timestamp columns
- It prevents tests from exceeding Jest's default 5-second timeout
- It speeds up test execution by removing all real I/O delays
Correct answer: It replaces `setTimeout`, `setInterval`, and `Date` with controllable fakes so time-dependent code can be tested synchronously
Fake timers let you advance time with `jest.advanceTimersByTime()` or `jest.runAllTimers()` without waiting for real clock ticks.
Question 10: Your team is adopting GraphQL subscriptions in Node.js. How do you explain the communication model to a REST-accustomed stakeholder?
- It's like REST but slower
- Subscriptions only work over gRPC
- Subscriptions maintain a persistent connection (via WebSocket) and push data to clients when server-side events occur (Correct answer)
- Clients must poll the GraphQL endpoint repeatedly
Correct answer: Subscriptions maintain a persistent connection (via WebSocket) and push data to clients when server-side events occur
GraphQL subscriptions use WebSocket connections to push real-time updates to subscribed clients when relevant data changes.
Question 11: How do you define a catch-all 404 handler in Express that runs after all other routes?
- app.error(404, fn)
- app.get('404', fn)
- app.use(fn) placed after all route definitions (Correct answer)
- app.use('*', fn) placed before routes
Correct answer: app.use(fn) placed after all route definitions
Middleware registered with app.use() after all routes runs only when no route matched the request.
Question 12: Which of the following correctly handles an error thrown inside a Promise executor?
- try/catch around new Promise()
- The Promise automatically rejects; attach a .catch() handler (Correct answer)
- process.on('uncaughtException')
- The error is silently swallowed
Correct answer: The Promise automatically rejects; attach a .catch() handler
Any exception thrown synchronously inside a Promise executor is automatically converted to a promise rejection.
Question 13: How do you efficiently concatenate multiple Buffer instances into a single Buffer?
- buf1.append(buf2)
- Buffer.concat([buf1, buf2]) (Correct answer)
- Buffer.merge(buf1, buf2)
- buf1 + buf2
Correct answer: Buffer.concat([buf1, buf2])
Buffer.concat() accepts an array of Buffers and an optional total length, allocating a new Buffer that contains all their bytes in sequence.
Question 14: What does the caret (`^`) range in `"express": "^4.18.0"` allow?
- Any version >=4.0.0
- Only the exact version 4.18.0
- Any version >=4.18.0 and <5.0.0 (Correct answer)
- Any version >=4.18.0 and <4.19.0
Correct answer: Any version >=4.18.0 and <5.0.0
The caret allows compatible updates: it pins the major version and allows minor and patch updates, so `>=4.18.0 <5.0.0`.
Question 15: In the context of Node.js, what is a 'middleware' function in Express?
- A function with access to req, res, and next that sits in the request-response cycle (Correct answer)
- A function that runs in a separate worker thread
- A function that caches database query results
- A function that compiles TypeScript before the server starts
Correct answer: A function with access to req, res, and next that sits in the request-response cycle
Middleware functions receive `(req, res, next)` and can execute code, modify the request/response, or pass control to the next middleware via `next()`.
Question 16: During a sprint review, a non-technical stakeholder asks about your Node.js service's uptime. Which metric best communicates reliability?
- Number of git commits
- Lines of code written
- Number of npm packages installed
- Percentage uptime (e.g., 99.9%) with mean time between failures (Correct answer)
Correct answer: Percentage uptime (e.g., 99.9%) with mean time between failures
Uptime percentage and MTBF are universally understood reliability metrics that resonate with non-technical stakeholders.
Question 17: What role does peer review play in Node.js practice?
- It is only for beginners
- It creates unnecessary competition
- It provides quality assurance and professional development through collegial evaluation (Correct answer)
- It replaces formal certification
Correct answer: It provides quality assurance and professional development through collegial evaluation
This is fundamental to Node.js practice. It provides quality assurance and professional development through collegial evaluation represents the professional standard for professional standards in the Node.js certification framework.
Question 18: Which assertion style does Chai's `expect` interface use?
- Chainable getter-based natural language assertions (Correct answer)
- Promise-based assertions using `.then()` chains
- Decorator-based assertions applied to class methods
- Callback-based assertions that call a done function
Correct answer: Chainable getter-based natural language assertions
Chai's `expect` style chains getters and methods like `expect(val).to.be.a('string').and.equal('hello')` to form readable assertions.
Question 19: Which response header tells the client the format of the response body in a REST API?
- Authorization
- Content-Type (Correct answer)
- X-Response-Format
- Accept
Correct answer: Content-Type
The Content-Type response header describes the media type of the body, e.g. application/json.
Question 20: What is the purpose of `.npmignore`?
- Specifies files to exclude when publishing a package to the registry (Correct answer)
- Prevents npm from reading certain config files
- Ignores packages in the lock file
- Lists packages to skip during `npm install`
Correct answer: Specifies files to exclude when publishing a package to the registry
`.npmignore` lists files and directories that should be omitted from the published package tarball, similar to `.gitignore`.
Question 21: How do Node.js professionals maintain digital competency?
- Through ongoing training, practice with new tools, and staying current with technological advances (Correct answer)
- By hiring IT support for all tasks
- Digital skills are not required
- Skills from initial training are sufficient
Correct answer: Through ongoing training, practice with new tools, and staying current with technological advances
This is fundamental to Node.js practice. Through ongoing training, practice with new tools, and staying current with technological advances represents the professional standard for technology in the Node.js certification framework.
Question 22: Which Node.js built-in module provides cryptographically strong random values for security-sensitive operations?
- util.random()
- crypto.randomBytes() (Correct answer)
- os.random()
- Math.random()
Correct answer: crypto.randomBytes()
crypto.randomBytes() uses the OS CSPRNG and is safe for tokens, keys, and nonces, unlike Math.random() which is not cryptographically secure.
Question 23: Which environment variable is conventionally used to set the Node.js execution environment (e.g., development, production)?
- RUNTIME_ENV
- NODE_ENV (Correct answer)
- NODE_MODE
- APP_MODE
Correct answer: NODE_ENV
`NODE_ENV` is the widely adopted convention used by frameworks like Express to toggle behavior between development and production.
Question 24: Which HTTP method is idempotent AND safe according to REST conventions?
- GET (Correct answer)
- POST
- DELETE
- PUT
Correct answer: GET
GET is both safe (no side effects) and idempotent (repeated calls yield the same result).
Question 25: What does calling readable.push(null) inside a custom Readable stream signify?
- Resets the stream to its initial state
- Clears the stream's internal buffer
- Signals the end of the stream (EOF) (Correct answer)
- Temporarily pauses the stream
Correct answer: Signals the end of the stream (EOF)
Pushing null is the sentinel value that tells Node.js the Readable stream has no more data to provide, triggering the 'end' event for consumers.
Question 26: Which internal method must you implement when subclassing stream.Readable to provide data to consumers?
- _read() (Correct answer)
- _write()
- _flush()
- _transform()
Correct answer: _read()
The _read() method is called by the stream internals when a consumer requests more data; you call this.push() inside it to supply chunks.
Question 27: What is the primary difference between a Duplex stream and a Transform stream in Node.js?
- Duplex streams are faster; Transform streams include built-in error handling
- Duplex has independent read and write sides; Transform derives its output directly from its input (Correct answer)
- There is no practical difference — they are fully interchangeable
- Transform supports binary data while Duplex supports only text
Correct answer: Duplex has independent read and write sides; Transform derives its output directly from its input
A Duplex stream has completely independent read and write channels (like a TCP socket), while a Transform stream's readable output is produced by processing its writable input.
Question 28: What is the difference between `dependencies` and `devDependencies`?
- There is no practical difference in Node.js apps
- `dependencies` are needed at runtime; `devDependencies` are only needed during development/testing (Correct answer)
- `devDependencies` are installed first
- `dependencies` cannot be updated; `devDependencies` can
Correct answer: `dependencies` are needed at runtime; `devDependencies` are only needed during development/testing
`dependencies` are required to run the application in production, while `devDependencies` (like test frameworks or build tools) are only needed locally.
Question 29: Which core module provides the `EventEmitter` class?
- util
- net
- events (Correct answer)
- stream
Correct answer: events
The `events` core module exports the `EventEmitter` class which is the foundation of Node.js event-driven architecture.
Question 30: What is the professional standard for handling uncaught exceptions in a Node.js production service?
- Catch every exception in a global try/catch and continue execution
- Disable exception propagation via --no-warnings flag
- Log the error and allow the process to crash, relying on a process manager to restart it (Correct answer)
- Silently swallow all exceptions to keep the process alive
Correct answer: Log the error and allow the process to crash, relying on a process manager to restart it
The recommended pattern is to log the error, perform cleanup if needed, and let the process exit so a process manager (PM2, systemd) can restart it cleanly.
Question 31: When you call app.use('/api', router) where router has router.get('/users', fn), what full path triggers fn?
- /api//users
- /api/users (Correct answer)
- /users
- /api
Correct answer: /api/users
Express concatenates the mount path /api with the router's /users path to form /api/users.
Question 32: Which command runs only tests whose names match a pattern in Jest?
- jest --only="pattern"
- jest --testNamePattern="pattern" (Correct answer)
- jest --filter="pattern"
- jest --grep="pattern"
Correct answer: jest --testNamePattern="pattern"
`--testNamePattern` (or `-t`) filters tests by matching the pattern against each test's full name including describe blocks.
Question 33: What is the recommended approach for managing environment-specific configuration in Node.js applications?
- Use global variables set at the OS level only in production
- Store all config in a JSON file committed to the repository
- Hardcode values for each environment inside the application logic
- Use environment variables loaded via process.env, often with a .env file for local development (Correct answer)
Correct answer: Use environment variables loaded via process.env, often with a .env file for local development
Environment variables decouple config from code, following the 12-factor app methodology.
Question 34: What does semantic versioning (semver) require when you make a backward-incompatible API change in a Node.js package?
- Add a pre-release tag without changing the version
- Increment the patch version (e.g., 1.0.1)
- Increment the minor version (e.g., 1.1.0)
- Increment the major version (e.g., 2.0.0) (Correct answer)
Correct answer: Increment the major version (e.g., 2.0.0)
Breaking changes require a major version bump so consumers know to expect incompatibilities.
Question 35: What is the purpose of calling next(err) inside an Express middleware?
- Passes control to the next error-handling middleware (Correct answer)
- Terminates the request silently
- Retries the current middleware
- Skips to the next route handler
Correct answer: Passes control to the next error-handling middleware
Passing an argument to next() triggers Express's error-handling pipeline, skipping regular middleware.
Question 36: What is the default maximum number of listeners for a single event on an EventEmitter before a warning is emitted?
- 10 (Correct answer)
- 100
- 5
- 20
Correct answer: 10
Node.js emits a memory leak warning when more than 10 listeners are added for a single event; this limit is configurable via `setMaxListeners()`.
Question 37: What does `npm outdated` report?
- Packages with security vulnerabilities
- Packages not listed in package.json
- Deprecated packages
- Packages where the installed version is behind the wanted or latest version (Correct answer)
Correct answer: Packages where the installed version is behind the wanted or latest version
`npm outdated` compares installed, wanted (range-satisfying), and latest versions to show which packages can be updated.
Question 38: Which Node.js coding practice aligns with the principle of 'fail fast'?
- Using try/catch to suppress all startup errors
- Catching all errors and returning empty responses
- Validating required configuration and throwing at startup if critical values are absent (Correct answer)
- Silently defaulting to fallback values when required config is missing
Correct answer: Validating required configuration and throwing at startup if critical values are absent
Failing fast at startup surfaces misconfigurations immediately rather than allowing a half-broken service to silently misbehave.
Question 39: How do you implement a timeout for a Promise-based operation in Node.js?
- Use process.nextTick() with a counter
- Pass a timeout option to the Promise constructor
- Use Promise.race() with a rejecting setTimeout promise (Correct answer)
- Wrap the promise in setInterval()
Correct answer: Use Promise.race() with a rejecting setTimeout promise
`Promise.race()` between your operation and a `new Promise((_, reject) => setTimeout(reject, ms))` pattern implements a timeout.
Question 40: Which MongoDB operator finds documents where an array field contains all of the specified values?
- $all (Correct answer)
- $elemMatch
- $in
- $contains
Correct answer: $all
`$all` matches documents where the array field contains every element in the provided array, regardless of order.
Question 41: Why is stream.pipeline() preferred over readable.pipe() for production code?
- It handles errors and automatically destroys all streams in the pipeline (Correct answer)
- It supports older Node.js versions that lack pipe()
- It enables bidirectional data flow between streams
- It provides better throughput on large files
Correct answer: It handles errors and automatically destroys all streams in the pipeline
stream.pipeline() propagates errors to a callback and destroys all piped streams on failure, preventing resource leaks that pipe() alone does not handle.
Question 42: What does the caret (^) prefix mean in a package.json version?
- Install any version greater than this number
- Allow updates that do not modify the left-most non-zero digit (Correct answer)
- Install exactly this version and nothing else
- The package is deprecated and should not be used
Correct answer: Allow updates that do not modify the left-most non-zero digit
The caret (^) allows updates to MINOR and PATCH versions while keeping the MAJOR version fixed (e.g., ^1.2.3 allows 1.x.x but not 2.0.0), following semver compatibility.
Question 43: How do you create a Buffer from a hexadecimal string in Node.js?
- Buffer.fromHex('deadbeef')
- Buffer.from('deadbeef')
- new Buffer('deadbeef', 16)
- Buffer.from('deadbeef', 'hex') (Correct answer)
Correct answer: Buffer.from('deadbeef', 'hex')
Buffer.from() accepts an encoding as the second argument; passing 'hex' interprets each pair of characters as a byte value.
Question 44: Which command shows the full dependency tree of installed packages?
- npm show deps
- npm list (Correct answer)
- npm tree
- npm deps
Correct answer: npm list
`npm list` (or `npm ls`) prints the dependency tree of the current project's node_modules.
Question 45: Why is documentation important in Node.js risk management?
- It is optional paperwork
- It only benefits legal teams
- It creates an audit trail, supports decision-making, and demonstrates due diligence (Correct answer)
- It slows down operations
Correct answer: It creates an audit trail, supports decision-making, and demonstrates due diligence
This is fundamental to Node.js practice. It creates an audit trail, supports decision-making, and demonstrates due diligence represents the professional standard for risk management in the Node.js certification framework.
Question 46: How do you convert a Node.js Buffer to a UTF-8 encoded string?
- String.fromBuffer(buffer)
- buffer.decode('utf-8')
- buffer.stringify()
- buffer.toString('utf8') (Correct answer)
Correct answer: buffer.toString('utf8')
The toString() method on a Buffer accepts an encoding argument and returns the decoded string; 'utf8' is the default if omitted.
Question 47: How do you read exactly n bytes from a Readable stream operating in paused mode?
- readable.pull(n)
- readable.read(n) (Correct answer)
- readable.fetch(n)
- readable.get(n)
Correct answer: readable.read(n)
In paused mode, readable.read(n) pulls exactly n bytes from the internal buffer (or null if fewer are available), giving you precise control over how much data you consume.
Question 48: What is the purpose of route parameters in Express?
- To set query parameters in the response
- To define the maximum number of routes allowed
- To configure routing table priorities
- To capture dynamic values from the URL path for use in request handlers (Correct answer)
Correct answer: To capture dynamic values from the URL path for use in request handlers
Route parameters (e.g., '/users/:id') capture dynamic segments from the URL path, making them available via req.params for use in request handlers.
Question 49: In Node.js, what is the role of `--require` when running Mocha?
- It forces Mocha to use CommonJS require instead of ESM import
- It loads a module before test files are executed, used for setup like registering Babel or loading env vars (Correct answer)
- It installs missing test dependencies at runtime
- It marks all tests in the specified file as required (non-skippable)
Correct answer: It loads a module before test files are executed, used for setup like registering Babel or loading env vars
`mocha --require @babel/register` is a common pattern that transpiles ES modules before tests run without changing test files.
Question 50: What does `npm version patch` do?
- Rolls back to the previous patch version
- Applies security patches from npm audit
- Displays the current patch version
- Increments the patch segment of the version and creates a git tag (Correct answer)
Correct answer: Increments the patch segment of the version and creates a git tag
`npm version patch` bumps the patch number (e.g., `1.0.0` → `1.0.1`), updates package.json, and creates a git commit and tag.
Question 51: Which npm script convention is universally recognized by CI systems and package managers to run tests?
- "ci": "..." in package.json scripts
- "test": "..." in package.json scripts (Correct answer)
- "check": "..." in package.json scripts
- "validate": "..." in package.json scripts
Correct answer: "test": "..." in package.json scripts
`npm test` (or `npm run test`) executes the `test` script defined in `package.json`, and CI platforms like GitHub Actions run it by default.
Question 52: Which of the following correctly accesses a URL query parameter in Express?
- req.body.q
- req.query.q (Correct answer)
- req.headers.q
- req.params.q
Correct answer: req.query.q
req.query contains the parsed query string key-value pairs from the URL.
Question 53: How do you propagate an error from a child async function to a parent async function in Node.js?
- Call process.emit('error', err) in the child
- Simply throw the error or let the rejected promise propagate — the parent's try/catch will catch it (Correct answer)
- Use EventEmitter to emit an 'error' event up the call stack
- Return the error object as the resolved value
Correct answer: Simply throw the error or let the rejected promise propagate — the parent's try/catch will catch it
In async/await, throwing in a child async function (or returning a rejected promise) causes the `await` expression in the parent to throw, which its `try/catch` handles.
Question 54: What is the purpose of the highWaterMark option when creating a Node.js stream?
- Sets the read timeout duration for the stream
- Sets the maximum file size that can be streamed
- Limits the number of concurrent stream instances
- Defines the internal buffer size threshold before backpressure is applied (Correct answer)
Correct answer: Defines the internal buffer size threshold before backpressure is applied
highWaterMark specifies the number of bytes (or objects in object mode) that can accumulate in the internal buffer before backpressure is triggered.
Question 55: What is the correct way to detect backpressure when writing to a Writable stream?
- Call writable.drain() to query available buffer capacity
- Check writable.buffer.length before each write call
- Check if writable.write() returns false, then pause the source until the 'drain' event fires (Correct answer)
- Monitor the 'pressure' event emitted by the writable stream
Correct answer: Check if writable.write() returns false, then pause the source until the 'drain' event fires
writable.write() returns false when the internal buffer is full; you should pause the source and resume writing only after the 'drain' event is emitted.
Question 56: How should an Node.js professional present complex information to non-experts?
- Skip complex topics entirely
- Translate into accessible language, use visuals, and check for understanding (Correct answer)
- Use full technical terminology
- Provide written reports only
Correct answer: Translate into accessible language, use visuals, and check for understanding
This is fundamental to Node.js practice. Translate into accessible language, use visuals, and check for understanding represents the professional standard for communication in the Node.js certification framework.
Question 57: In Node.js, the ______ core module is used to create a web server.
- fs
- url
- http (Correct answer)
- connect
Correct answer: http
Explanation: <br> HTTP is the application layer protocol in the OSI Model. NodeJS features an HTTP module that may be used as both a client and a server. This module comes pre-installed with Node, thus you won't need to install any other node modules to utilize it.
Question 58: How should Node.js professionals handle conflicts with stakeholders?
- Escalate immediately to management
- Ignore stakeholder concerns
- Avoid all conflict
- Address issues professionally through active listening, finding common ground, and seeking resolution (Correct answer)
Correct answer: Address issues professionally through active listening, finding common ground, and seeking resolution
This is fundamental to Node.js practice. Address issues professionally through active listening, finding common ground, and seeking resolution represents the professional standard for communication in the Node.js certification framework.
Question 59: What happens to a Readable stream when you attach a 'data' event listener to it?
- The stream switches into flowing mode and data begins emitting automatically (Correct answer)
- The stream switches to object mode
- The stream enters paused mode and waits for explicit read() calls
- The stream buffers all data until the 'end' event fires
Correct answer: The stream switches into flowing mode and data begins emitting automatically
Attaching a 'data' listener switches the stream from paused to flowing mode, causing chunks to be emitted as fast as they arrive without explicit pull calls.
Question 60: Which technique mitigates the risk of prototype pollution attacks in a Node.js application?
- Running with --harmony flag
- Freezing Object.prototype with Object.freeze() (Correct answer)
- Using var instead of let
- Disabling the V8 optimizer
Correct answer: Freezing Object.prototype with Object.freeze()
Object.freeze(Object.prototype) prevents attackers from injecting properties into the shared prototype chain.
Question 61: How do you run a locally installed CLI tool (in node_modules/.bin) without adding it to PATH?
- npm exec
- npm start
- node_modules run
- npx (Correct answer)
Correct answer: npx
`npx <tool>` executes a binary from node_modules/.bin (or downloads it temporarily) without needing a global install.
Question 62: Node.js streams kinds are.
- Readable
- Writable
- Duplex
- All of the above (Correct answer)
Correct answer: All of the above
Explanation: <br> Node.js Streams are objects that allow developers to continuously receive and write data to and from a source. In Node.js, there are four sorts of streams: readable, writable, duplex, and transform. Each stream is an instance of eventEmitter that emits various events at various intervals.
Question 63: What is the most effective communication approach for Node.js professionals?
- Minimizing all communications
- Using technical language exclusively
- Only written communication
- Adapting communication style to the audience while maintaining accuracy and clarity (Correct answer)
Correct answer: Adapting communication style to the audience while maintaining accuracy and clarity
This is fundamental to Node.js practice. Adapting communication style to the audience while maintaining accuracy and clarity represents the professional standard for communication in the Node.js certification framework.
Question 64: What method connects a Readable stream to a Writable stream so data flows automatically?
- writable.receive(readable)
- readable.pipe(writable) (Correct answer)
- readable.forward(writable)
- readable.connect(writable)
Correct answer: readable.pipe(writable)
The pipe() method on a Readable stream automatically forwards chunks to the destination Writable stream and manages backpressure.
OpenJS Node.js Application Developer (JSNAD)
The JSNAD certification, offered by the OpenJS Foundation and Linux Foundation, validates proficiency in Node.js application development including core modules, streams, async patterns, event handling, and package management. The exam uses a hands-on, performance-based format with a passing score of 68%.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds