Node.js Quiz | Set-1

Last Updated :
Discuss
Comments

Question 1

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

Question 2

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

Question 3

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

Question 4

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

Question 5

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

Question 6

Which template engines can be used with Node.js ?

  • A

    Jade

  • B

    Vash

  • C

    Handlebars

  • D

    All of the above

Question 7

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

Question 8

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

  • A

    Global

  • B

    Local

  • C

    Global Function

  • D

    Local to object

Question 9

Which of the below method is used to return the current working directory of the process ?
  • A
    cwd();
  • B
    cmd();
  • C
    pwd();
  • D
    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 ?
  • A
    path.Query()
  • B
    path.render()
  • C
    path.isAbsolute()
  • D
    path.Absolute()

There are 15 questions to complete.

Take a part in the ongoing discussion