0% found this document useful (0 votes)
6 views8 pages

Node Imp

The document contains a series of questions and answers related to Node.js, covering topics such as its core modules, file handling, package management, and server operations. Key concepts include the use of the V8 engine, the Node Package Manager (npm), and various methods and libraries associated with Node.js development. It also addresses best practices and common tools used in conjunction with Node.js.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views8 pages

Node Imp

The document contains a series of questions and answers related to Node.js, covering topics such as its core modules, file handling, package management, and server operations. Key concepts include the use of the V8 engine, the Node Package Manager (npm), and various methods and libraries associated with Node.js development. It also addresses best practices and common tools used in conjunction with Node.js.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1. Which engine powers Node JS?

A. SpiderMonkey
B. V8 ✅
C. JavascriptCore
D. Chakra

2. Which of the following extension is used to save the Node js files?

A. .js ✅
B. .node
C. .java
D. .njs

3. What is the purpose of the Node Package Manager (npm)?

A. To manage [Link] packages and dependencies ✅


B. To run [Link] applications
C. To debug [Link] code
D. To deploy [Link] applications to cloud

4. [Link] is written in _____________

A. Javascript
B. C
C. C++
D. All of the above ✅

5. Which of the following are NodeJS global objects?

A. __dirname
B. __filename
C. Buffer
D. All of the above ✅
6. Which method reads the content of the file in Node JS?

A. [Link] ✅
B. [Link]
C. [Link]
D. [Link]

7. What does the [Link] method do in Node JS?

A. Reads a file
B. Writes to a file
C. Deletes a file ✅
D. Renames a file

8. [Link] is designed to handle which type of operations efficiently?

A. Synchronous
B. Asynchronous ✅
C. Parallel
D. Serial

9. All APIs of [Link] are

A. Asynchronous ✅
B. Synchronous
C. Both of the above
D. None of the above

10. [Link] is built on which JavaScript engine?

A. Chakra
B. SpiderMonkey
C. V8 ✅
D. Rhino
11. Which command installs [Link] packages globally?

A. npm install package


B. npm install -g package ✅
C. node install package
D. node -g package

12. Which core module is used to interact with the file system in [Link]?

A. os
B. path
C. fs ✅
D. events

13. The path module in [Link] is used for:

A. File system operations


B. Handling and transforming file paths ✅
C. Event handling
D. HTTP requests

14. [Link] streams are primarily used for:

A. Batch processing only


B. Handling large files/data efficiently ✅
C. Styling frontend pages
D. Managing routing

15. Callback functions in [Link] are used to:

A. Execute code sequentially


B. Handle asynchronous operations ✅
C. Convert synchronous code into async
D. Block I/O
16. Which statement about Promises is true?

A. They replace callbacks entirely


B. They represent a value that may be available now, later, or never ✅
C. They are synchronous by default
D. They are used only in [Link]

17. The keyword await can only be used inside:

A. A normal function
B. An async function ✅
C. A constructor
D. A callback function

18. What does npm stand for?

A. Node Project Manager


B. Node Package Manager ✅
C. Node Program Module
D. None of the above

19. [Link] HTTP server is created using which core module?

A. net
B. http ✅
C. express
D. server

20. Which method is used to listen on a specific port in [Link] HTTP server?

A. [Link]()
B. [Link]()
C. [Link]() ✅
D. [Link]()
21. [Link] is primarily used for:

A. Frontend UI development
B. Simplifying server-side code in [Link] ✅
C. Database queries
D. Managing npm packages

22. Which method in Express is used to handle GET requests?

A. [Link]()
B. [Link]()
C. [Link]() ✅
D. [Link]()

23. Which database is commonly used with [Link] for NoSQL operations?

A. MySQL
B. MongoDB ✅
C. Oracle
D. PostgreSQL

24. Mongoose in [Link] is used for:

A. Creating APIs
B. Object Data Modeling with MongoDB ✅
C. SQL queries
D. Middleware handling

25. Which library is used in [Link] for password hashing?

A. jsonwebtoken
B. bcrypt ✅
C. multer
D. express-session
26. JWT stands for:

A. Java Web Token


B. JavaScript Web Token
C. JSON Web Token ✅
D. JavaScript Wrapped Transmission

27. Multer in [Link] is used for:

A. File uploads ✅
B. API testing
C. Authentication
D. Error handling

28. Which library is used in [Link] for real-time communication?

A. Express
B. [Link] ✅
C. Postman
D. Mongoose

29. In [Link], [Link] is used for:

A. Error handling
B. Reading environment variables ✅
C. File operations
D. Logging

30. Which of the following is NOT a logging best practice?

A. Use structured logs


B. Log sensitive data like passwords ✅
C. Use proper logging levels
D. Centralize logs in production
31. Hosting a [Link] app on platforms like Heroku or Vercel requires:

A. A [Link] with start script ✅


B. Only database connection details
C. An HTML frontend
D. Removing npm dependencies

32. Which of the following best describes [Link]?

A. A programming language
B. A runtime environment for JavaScript ✅
C. A database framework
D. A web browser API

33. Which [Link] core module provides utilities for working with OS tasks?

A. path
B. os ✅
C. util
D. events

34. Which method in [Link] http module is used to handle incoming data
streams?

A. [Link]() ✅
B. [Link]()
C. [Link]()
D. [Link]()

35. What is the default port for a [Link] application if not specified?

A. 8080
B. 80
C. 3000
D. No default port, it must be defined ✅
36. Which of the following statements are true?

A. [Link] is a server side language


B. [Link] is a client-side language
C. [Link] is both server and client-side language ✅
D. None of the above

37. Which module is used to create a web server in [Link]?

A. fs
B. http ✅
C. os
D. url

38. Which function is used to include modules in [Link]?

A. include()
B. require() ✅
C. import()
D. using()

39. Which object is used to handle incoming HTTP requests in [Link]?

A. response
B. request ✅
C. server
D. client

40. What does the [Link] file contain?

A. Project metadata and dependencies ✅


B. Only scripts
C. Only database config
D. Only server config

You might also like