Node JS Quiz Questions and Answers

How do you write "Hello World " in an alert box?

Answer :
  • alert( "Hello World ");

How can you detect the client's browser name?

Answer :
  • navigator.appName

What kind of scoping does JavaScript use?

Answer :
  • Lexical

In general, the event handler is nothing but...

Answer :
  • function

Which method of fs module is used to remove a directory?

Answer :
  • fs.rmdir(path , callback)

Which of the following is the correct way to get a normalized path?

Answer :
  • path.normalize('/test/test1//2slashes/1slash/tab/..')

Which of the following module is required to create a web server?

Answer :
  • http module

Node.js runs on __________.

Answer :
  • Server

Node.js is ________ by default.

Answer :
  • Asynchronous

What does npm stand for?

Answer :
  • Node Package Manager