- Node.js Tutorial
- Node.js - Home
- Node.js - Introduction
- Node.js - Environment Setup
- Node.js - First Application
- Node.js - REPL Terminal
- Node.js - Command Line Options
- Node.js - Package Manager (NPM)
- Node.js - Callbacks Concept
- Node.js - Upload Files
- Node.js - Send an Email
- Node.js - Events
- Node.js - Event Loop
- Node.js - Event Emitter
- Node.js - Debugger
- Node.js - Global Objects
- Node.js - Console
- Node.js - Process
- Node.js - Scaling Application
- Node.js - Packaging
- Node.js - Express Framework
- Node.js - RESTFul API
- Node.js - Buffers
- Node.js - Streams
- Node.js - File System
- Node.js MySQL
- Node.js - MySQL Get Started
- Node.js - MySQL Create Database
- Node.js - MySQL Create Table
- Node.js - MySQL Insert Into
- Node.js - MySQL Select From
- Node.js - MySQL Where
- Node.js - MySQL Order By
- Node.js - MySQL Delete
- Node.js - MySQL Update
- Node.js - MySQL Join
- Node.js MongoDB
- Node.js - MongoDB Get Started
- Node.js - MongoDB Create Database
- Node.js - MongoDB Create Collection
- Node.js - MongoDB Insert
- Node.js - MongoDB Find
- Node.js - MongoDB Query
- Node.js - MongoDB Sort
- Node.js - MongoDB Delete
- Node.js - MongoDB Update
- Node.js - MongoDB Limit
- Node.js - MongoDB Join
- Node.js Modules
- Node.js - Modules
- Node.js - Built-in Modules
- Node.js - Utility Modules
- Node.js - Web Module
- Node.js Useful Resources
- Node.js - Quick Guide
- Node.js - Useful Resources
- Node.js - Dicussion
Node.js Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Node.js Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - All APIs of Node.JS are.
Answer : A
Explanation
All APIs of Node.js library are aynchronous that is non-blocking.
Q 2 -What npm stands for?
Answer : A
Explanation
npm stands for Node Package Manager.
Q 3 - Which of the following code converts a buffer buf to JSON object?
Answer : A
Explanation
buf.toJSON() converts a buffer buf to JSON object.
Q 4 - Which of the following is true about Chaining streams?
Answer : C
Explanation
Chanining is a mechanism to connect output of one stream to another stream and create a chain of multiple stream operations. It is normally used with piping operations.
Q 5 - Which of the following is true about global objects in Node applications?
A - Global objects are global in nature and they are available in all modules.
Answer : C
Explanation
Node.js global objects are global in nature and they are available in all modules. We do not need to include these objects in our application, rather we can use them directly.
Q 6 - Which of the following is true about console global object?
B - console is used in synchronous way when destination is file or a terminal.
C - console is used in asynchronous way when destination is a pipe.
Answer : D
Explanation
Node.js console is a global object and is used to print different levels of messages to stdout and stderr. There are built-in methods to be used for printing informational, warning and error messages. It is used in synchronous way when destination is file or a terminal and asynchronous way when destination is a pipe.
Q 7 - Which of the following code print the platform of operating system?
A - console.log('platform : ' + os.platform);
B - console.log('platform : ' + os.platform());
Answer : B
Explanation
os.platform() returns the operating system platform.
Answer : A
Explanation
net.isIP(input) tests if input is an IP address. Returns 0 for invalid strings, returns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses.
Q 9 - Which of the following module is required to create a child process?
Answer : B
Explanation
Node provides child_process module which provides ways to create child process.
Q 10 - Child processes always have three streams child.stdin, child.stdout, and child.stderr which may be shared with the stdio streams of the parent process.
Answer : A
Explanation
Child processes always have three streams child.stdin, child.stdout, and child.stderr which may be shared with the stdio streams of the parent process.