What is the command used to import external libraries?

 The “require” command is used for importing external libraries. 

Example:
var http=require (“http”)
It will load the http library . The single exported object through the http variable.

Comments

Popular posts from this blog

What is a Callback function in Node.js?

What is an Event loop in Node.js and how does it work?