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.

Questions and Answers

Answer : C

Explanation

Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast in code execution.

Answer : B

Explanation

You can use undercore _ to get the last result.

Q 3 - Node js is a single threaded application but supports concurrency.

A - true

B - false

Answer : A

Explanation

True! Node js is a single threaded application but it support concurrency via concept of event and callbacks.

Answer : A

Explanation

fs.close(fd, callback) is the method which is used to close a file.

Answer : C

Explanation

fs.readdir(path, callback)is the method which is used to read a directory.

Answer : A

Explanation

process.cwd() can be used to get the current working directory.

Answer : B

Explanation

os.platform() returns the operating system platform.

Q 8 - Which of the following method resolves an ip address to an array of hostnames?

A - dns.reverse(ip, callback)

B - dns.resolve(hostname[, rrtype], callback)

C - dns.resolve4(hostname, callback)

D - None of the above.

Answer : A

Explanation

dns.reverse(ip, callback) resolves an ip address to an array of hostnames.

Answer : B

Explanation

Error emmitter is added explicitly to a domain using its add method in case of external binding.

Q 10 - A stream fires error event when there is any error receiving or writing data.

A - false

B - true

Answer : B

Explanation

A stream fires error event when there is any error receiving or writing data.

nodejs_questions_answers.htm
Advertisements