Please Select a Company.
Please Select a Company.
Nodejs MCQ Questions | Interview Quick

.

NodeJS MCQ

1. When a javaScript function is invoked (called) in Node, where is a new frame placed?

2. Which of the following is a core module in Node?

3. Which of the following Buffer class methods returns an uninitialized buffer?

4. Which of the following modules is NOT a built-in module in Node?

5. Which fs module method can be used to read the content of a file without buffering it in memory?

6. Which of the following DNS module methods uses the underlying OS facilities and does not necessarily perform any network communication?

7. How do you check that a value is a date object in Node?

8. Can you create an https web server with Node.js?

9. What is the Api that is designed to insulate Addons from changes in the underlying JavaScript engine?

10. . Which CLI option can you use to debug a node script in Chrome DevTools?

11. How can you count the number of logical CPUs on the machine that is running Node?

12. Which of the following is a method on the console object?

13. Which object is used to manage the cache of required modules?

14. What is the command to silence all process warnings?

15. How can you use the promise API with a callback-based function such as child_process.exec?

16. Which of the following is NOT a Node repl command?

17. If EventEmitter is in scope, which of the following lines of code will have an event emitter emitting a change event?

18. Which of the following objects is a stream

19. Which module variable holds the resolved absolute path of the current module file?

20. If the child_process module methods are in scope, what is a current way to execute the command ps -ef using a child process?

21. Which console method can be used to print the stack trace to the point of its execution?

22. When you run JavaScript in a Node.js application, which of the following elements in a Node.js stack actually executes that JavaScript?

23. What is the purpose of the path module?

24. How do you make an HTTP server object active and listen to requests on certain ports?

25. How do you start a Node application, if the entry file is indexjs?

26. What is the purpose of the file system (fs) module?

27. What is the Node LTS version?

28. Which of the following is NOT a valid stream in Node?

29. Which choice is not a valid method on event emitters?

30. Which special object is an instance of EventEmitter?Which special object is an instance of null?

31. What is the command to get a list of available commands for Node.js?What is the command to get a list of available commands for Node.js?

32. When a request event is received in the HTTP module, what is the type of the first argument passed to that event, usually named req?

33. What are the arguments passed to the module wrapper function?

34. Which library provides Node.js with the event loop?

35. What does the .node file extension represent?

36. What can you export with module.exports?

37. Which core module in Node can you use to take advantage of multicore systems?

38. Which core Node module has wrappers for OpenSSL methods?

39. Which line imports a promise-based version of the readFile method?

40. According to the rules of semantic versioning, what does a release incrementing the third number in an npm version string communicate to users about the release changes?

41. What does REPL stand for?

42. Which file does node-gyp use to read the build configuration of a module?

43. Which core module in Node can you use for testing?

44. Which core module in Node provides an API to register callbacks to track asynchronous resources created inside a Node.js application?

45. Which Node.js module should you use when you need to decode raw data into strings?

46. Which global object acts like a bridge between a Node script and the host operating system?

47. Which statement is true about Node.js and threads?

48. Which statement about event emitters is false?

49. Which core module in Node can you use to compile and run JavaScript code in a sandbox environment?

50. How would you determine the number of cluster instances to start when using the cluster module?

51. You have to read a large text file, replace some words in it, and write it back to a new file. You know that the memory on your target system is limited. What should you do?

52. Which choice is not a Node global object?

53. What is the correct way to pipe a readable stream and a writable stream?

54. How can you convert path segments into a string using the platform-specific separator as a delimiter?

55. What is the purpose of N-API?

56. What is a process object and its role?

57. Is it possible to write tests in Node.js without an external library?

58. Which assert module method is usually used to test the error-first argument in callbacks?

59. Which choice is not a method on the util module?

60. Which choice is not a subclass of the Error class?

61. What is Node built on?

62. How does it affect the performance of a web application when an execution path contains a CPU-heavy operation, such as calculating a long Fibonacci sequence?

63. What is used for parsing and running Javascript in Node.js?

64. What is the importance of having good practices around status code in your response?

65. How can ECMAScript modules be used natively in Node?

66. When exploring the Node documentation's features, what are the stability ratings?

67. Which choice is a core module in Node?

68. Which DNS module method uses the underlying OS facilities and does not necessarily perform any network communication?

69. What is one way to check that a value is a date object in Node?

70. When you require(something), where will Node.js attempt to resolve(something)?

71. An external library has its own codebase and license. It is not managed by the Node.js core team. Which choice is an external library that Node.js uses?

72. What is the main purpose of the package-lock.json file?

73. How would you determine the number of cluster instances to start when using the cluster module?

Our Brands by Nishtya Infotech Private Limited:

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as