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 an Event loop in Node.js and how does it work?

What is promise, promise.all and promise.race? How do you chain promises?