Node.js Cheat Sheet 2026

The 30 highest-yield Node.js facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

65 questions
120 min time limit
68.00% to pass
  1. _________ is a Node.js debugging tool with a graphical user interface. Node Inspector
  2. What event does a Readable stream emit after all data has been consumed and the stream has closed? 'end'
  3. In the REPL session, the Underscore Variable is used to get the last result.
  4. What is the default string encoding used when creating a Buffer from a string in Node.js? utf8
  5. What is semantic versioning (semver) in npm? A versioning scheme using MAJOR.MINOR.PATCH where each number indicates the type of change
  6. To read a file, the ______ fs module's method is utilized. fs.read(fd, buffer, offset, length, position, callback)
  7. How should Node.js professionals prioritize identified risks? Based on likelihood of occurrence combined with severity of potential impact
  8. What method connects a Readable stream to a Writable stream so data flows automatically? readable.pipe(writable)
  9. What role does active listening play in Node.js practice? It ensures accurate understanding, demonstrates respect, and improves outcomes
  10. What HTTP method should be used to update an existing resource in a REST API? PUT or PATCH
  11. Which Node.js stream type is used exclusively for reading data? Readable
  12. How do you determine the byte length of a string for a given encoding without allocating a full Buffer? Buffer.byteLength(string, encoding)
  13. How do you convert a Node.js Buffer to a UTF-8 encoded string? buffer.toString('utf8')
  14. Why is stream.pipeline() preferred over readable.pipe() for production code? It handles errors and automatically destroys all streams in the pipeline
  15. Which stream base class should you extend to implement a custom stream that both reads input and produces transformed output? stream.Transform
  16. What is the file extension for NodeJs files? .js
  17. Node.js streams kinds are. All of the above
  18. What is the first step in risk assessment for Node.js professionals? Identifying potential hazards and vulnerabilities in the specific context
  19. What does 'require()' do in Node.js? Imports and caches a module, returning its exports
  20. Which of the following statements regarding Chaining Streams is correct? Both of the above
  21. What exactly is the REPL? REPL stands for "Read Eval Print Loop."
  22. What is the purpose of regular risk reviews in Node.js practice? To identify new risks, evaluate control effectiveness, and update mitigation strategies
  23. How does a Node.js professional communicate risks to stakeholders? By presenting risks clearly with context, potential impacts, and recommended actions
  24. Which of the following statements regarding the EventEmitter.on property is correct? on property is used to bind a function with the event
  25. Which of the following lines of code prints the amount of memory used? console.log('Current version: ' + process.memory());
  26. What is the importance of data security in Node.js digital applications? Protecting sensitive information from unauthorized access, breaches, and loss is essential
  27. What is the purpose of 'try...catch' with async/await? To catch errors thrown by awaited Promises in a synchronous-looking style
  28. How should unhandled Promise rejections be handled in a production Node.js application? By adding a global 'unhandledRejection' event handler and logging the error
  29. What is a risk mitigation strategy in Node.js practice? Implementing controls that reduce the likelihood or impact of identified risks
  30. In Node.js, the ______ core module is used to create a web server. http