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 statements are true?
_____ is an interactive shell that processes Node.
What is the full form of REPL?
Node.js is written in which language?
How can we install the node body-parser module?
Which of the following are examples of node modules?
To include the HTTP server in the node module, what function do we use?
How can we expose node modules?
What method is used to return the current working directory of the process?
Default scope in Node.js application is?
How many node objects methods are available?
We can kill a process in Node.js using the keyboard shortcut?
What is the full form of npm?
How can we initiate a NodeJS file called Hello in Node?
NodeJS is supported on which of the following platforms?
____ is a debugging tool for NodeJS?
The node object property which is used to return the node just before the current node is?
The advantages of using node modules are?
Which of the following are examples of NodeJS streams types?
The command to install nodemon in NodeJS is?
Which of the following are built-in node modules?
_ variable in REPL session of NodeJS is used for?
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.
When does a stream fire a data event?
For path specific operations which of the following operations is required to be used?
Which of the following operations can we do with the NodeJS events module?
How can we check the installed version of Node?
What command do we use to list all the node modules that are installed globally?
Which of the following is a valid HTTP method?
Which of the following fs module is used to close a file?
Which of the following NodeJS module splits up a web address into readable parts?
NodeJS uses an event-driven, non-blocking IO model?
Which NodeJS statement is used to list all the locally installed NodeJS modules?
A visual development environment for NodeJS is?
Which of the following NodeJS modules is used for file uploads?
Which node module is used to handle binary data?
Which node module is used for zip and unzip functionalities?
Which of the following is used for cryptographic protocols to secure communication over the web?
Which node module is used to serve static resources in NodeJS?
_____ is a software service that allows 2 or more applications to talk to each other?
Which of the following are StringDecoder class methods?
Which of the following NodeJS modules is now deprecated?
What does the fs module stand for?
Which of the following are the benefits of using modules?
Applications built on NodeJS can access which of the following types of databases?
Which of the following are NodeJS global objects?
JSON was natively constructed on which language?
Which NodeJS object specifies the name of the directory which contains the code?
What function is used to fire an event?
Which of the following parameters is taken by the buffer.toString method?
What is a callback?