- 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 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 - What is Node.JS?
B - Node.js is a JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine.
Answer : B
Explanation
Node.js is a JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine.
Q 2 - Which of the following command will show version of npm?
Answer : A
Explanation
Executing $ npm --version command will show the version of npm instance.
Answer : A
Explanation
True! Node js is a single threaded application but it support concurrency via concept of event and callbacks.
Q 4 - Which method of fs module is used to read a file?
A - fs.open(path, flags[, mode], callback)
B - fs.openFile(path, flags[, mode], callback)
Answer : D
Explanation
fs.read(fd, buffer, offset, length, position, callback) is the method which is used to read a file.
Q 5 - Which method of fs module is used to read a directory?
A - fs.readDirectory(path[, mode], callback)
B - fs.read(path[, mode], callback)
Answer : C
Explanation
fs.readdir(path, callback)is the method which is used to read a directory.
Answer : A
Explanation
Node.js console is a global object and is used to print different levels of messages to stdout and stderr.
Q 7 - Which of the following code print the total system memory of operating system?
A - console.log('total memory : ' + os.totalmem() + " bytes.");
B - console.log('total memory : ' + os.totalmem + " bytes.");
C - console.log('total memory : ' + os.getTotalMemory() + " bytes.");
Answer : A
Explanation
os.totalmem() returns the total amount of system memory in bytes.
Q 8 - Which of the following module is required for DNS specific operations?
Answer : A
Explanation
Node.js dns module is used to do actual DNS lookup as well as to use underlying operating system name resolution functionalities.
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.
Answer : A
Explanation
Each type of Stream is an EventEmitter instance and throws several events at different instance of times.