NodeJS MCQ
NodeJS is an open-source client-server environment, which is free and runs on cross platforms(multiple platforms like Windows, Unix, Mac OS, etc). NodeJS uses JavaScript on the server side.
NodeJS is preferred because it uses asynchronous programming. It eliminates the wait time for processing a task and directly continues with the next request made by the server. It runs single-threaded, non-blocking, asynchronous programming, which is very memory efficient.
Functionalities of NodeJS:
- Generates dynamic page content.
- On the server-side, it can create, open, read, write, delete, and close files.
- It can collect form data.
- It can add, delete and modify data in the database.
NodeJS tasks are done in NodeJS files. These files contain tasks that will be executed on certain events. These files must be instantiated on the server before having any effect, and have the file extension ‘.js’.
NodeJS MCQs
Which of the following is a valid HTTP method?
Which node module is used for zip and unzip functionalities?
Which node module is used to handle binary data?
Which node module is used to serve static resources in NodeJS?
Which NodeJS object specifies the name of the directory which contains the code?
Which NodeJS statement is used to list all the locally installed NodeJS modules?
Which of the following are built-in node modules?
Which of the following are examples of node modules?
Which of the following are examples of NodeJS streams types?
Which of the following are NodeJS global objects?
Which of the following are StringDecoder class methods?
Which of the following are the benefits of using modules?
Which of the following fs module is used to close a file?
When does a stream fire a data event?
Which of the following is used for cryptographic protocols to secure communication over the web?
Which of the following NodeJS module splits up a web address into readable parts?
Which of the following NodeJS modules is now deprecated?
Which of the following NodeJS modules is used for file uploads?
Which of the following operations can we do with the NodeJS events module?
Which of the following parameters is taken by the buffer.toString method?
Which of the following statements are true?
Which of the following statements are true?
- NodeJS is multithreaded.
- The Buffer class is a global class that can be accessed without importing a buffer module.
_ variable in REPL session of NodeJS is used for?
____ is a debugging tool for NodeJS?
_____ is a software service that allows 2 or more applications to talk to each other?
_____ is an interactive shell that processes Node.
The advantages of using node modules are?
Applications built on NodeJS can access which of the following types of databases?
Default scope in Node.js application is?
For path specific operations which of the following operations is required to be used?
How can we check the installed version of Node?
How can we expose node modules?
How can we initiate a NodeJS file called Hello in Node?
How can we install the node body-parser module?
How many node objects methods are available?
JSON was natively constructed on which language?
Node.js is written in which language?
NodeJS is supported on which of the following platforms?
NodeJS uses an event-driven, non-blocking IO model?
A visual development environment for NodeJS is?
The command to install nodemon in NodeJS is?
The node object property which is used to return the node just before the current node is?
To include the HTTP server in the node module, what function do we use?
We can kill a process in Node.js using the keyboard shortcut?
What command do we use to list all the node modules that are installed globally?
What does the fs module stand for?
What function is used to fire an event?
What is a callback?
What is the full form of npm?
What is the full form of REPL?
What method is used to return the current working directory of the process?