epam-short-track

Core JS mentors interview #3

Node.js Basics

  1. What is Node.js, and how does it differ from browser-based JavaScript?
  2. What is the purpose of the package.json file, and how does it differ from package-lock.json?
  3. How do CommonJS (require) and ES Modules (import) differ in Node.js?
  4. Briefly explain what streams are in Node.js and describe their types.
  5. How do environment variables work in Node.js, and how are they used in applications?

    Networking

  6. What is HTTP, and how does the HTTP request-response cycle work?
  7. Compare and contrast HTTP/1, HTTP/2, and HTTP/3.
  8. What is REST, and what are its key principles?
  9. What are HTTP status codes? Provide examples of success, client error, and server error status codes.

    Security

  10. What is XSS (Cross-Site Scripting), and how can it be prevented?
  11. What is CSRF (Cross-Site Request Forgery), and how does it differ from XSS?
  12. Explain how you would secure sensitive environment variables in a Node.js application.
  13. What is CORS, and how does it relate to the Same-Origin Policy?

    Testing

  14. What is the Arrange-Act-Assert (AAA) pattern, and why is it important in writing unit tests?
  15. What is mocking, and how does it help isolate dependencies in tests?
  16. Explain the principles of the FIRST (Fast, Independent, Repeatable, Self-validating, Timely) acronym in testing.
  17. What are flaky tests, and how can they be addressed to improve CI/CD pipelines?

    Critical Rendering Path (CRP)

  18. What are the main stages of the Critical Rendering Path (CRP)?
  19. For moving an element during animation, is it better to use transition: translate or modify properties like left, top, etc.? Why?

    Debugging Tools

  20. What debugging tools do you use for Node.js or web development, such as Chrome DevTools? Share an example of how you’ve identified or resolved an issue using these tools.