• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Node.js Quiz | Set-1

Question 1

Node.js is written in
  • JavaScript
  • C
  • C++
  • All of the above

Question 2

How modules in Node.js can be connected from one component to another ?
  • Expose
  • Module
  • Exports
  • All of the above

Question 3

Which of the below modules is not a built-in module in Node.js ?
  • zlib
  • HTTPS
  • dgram
  • fsread

Question 4

Which of the below command will show all the modules installed locally ?
  • npm ls -g
  • npm ls
  • node ls -g
  • node ls

Question 5

Which of the below fs module is used to truncate a file ?
  • fs.delete(fd, len, callback)
  • fs.remove(fd, len, callback)
  • fs.ftruncate(fd, len, callback)
  • None of the above.

Question 6

Which template engines can be used with Node.js ?

  • Jade

  • Vash

  • Handlebars

  • All of the above

Question 7

How do we return a path string from the given path object in Node.js ?
  • path.get()
  • path.set()
  • path.format()
  • path.return()

Question 8

What is the default scope in the Node.js application ?

  • Global

  • Local

  • Global Function

  • Local to object

Question 9

Which of the below method is used to return the current working directory of the process ?
  • cwd();
  • cmd();
  • pwd();
  • None of the above

Question 10

Which below method is used to check whether the given path is an absolute path or not in Node.js ?
  • path.Query()
  • path.render()
  • path.isAbsolute()
  • path.Absolute()

There are 15 questions to complete.

Last Updated :
Take a part in the ongoing discussion