Command “require” is used in Node JS for import external libraries. Mentioned below is an example of this. “var http=require (“http”)”. This will load the library and the single exported object through the HTTP variable.

BY Best Interview Question ON 06 Jan 2020