Node.js Online Quiz


Advertisements

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.

Questions and Answers

Answer : D

Explanation

Node.js is a very powerful JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine. It is used to delevop I/O intensive web applications like video streaming sites, single page applications and other web application. Node.js is open source, completely free, and used by thousands of developers around the world.

Q 2 - By default, npm installs any dependency in the local mode.

A - true

B - false

Answer : A

Explanation

By default, npm installs any dependency in the local mode.

Answer : C

Explanation

emit property is used to fire an event.

Answer : A

Explanation

fs.open(path, flags[, mode], callback) is the method which is used to open a file.

Answer : C

Explanation

The setInterval(cb, ms) global function is used to run callback cb repeatedly after at least ms milliseconds. The actual delay depends on external factors like OS timer granularity and system load. - A timer cannot span more than 24.8 days. This function returns an opaque value that represents the timer which can be used to clear the timer using the function clearInterval(t).

Answer : B

Explanation

process.version can be used to get the current process version.

Answer : A

Explanation

os.freemem() returns the free amount of system memory in bytes.

Answer : C

Explanation

dns.lookup(hostname[, options], callback) resolves a hostname (e.g. 'google.com') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IP v4 and v6 addresses are both valid. If options is an integer, then it must be 4 or 6.

Answer : D

Explanation

child_process.exec method runs a command in a shell and buffers the output. It returns a buffer with a max size and waits for the process to end and tries to return all the buffered data at once.

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.

A - true

B - false

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.

nodejs_questions_answers.htm
Advertisements