InterviewSolution
| 1. |
What do you understand by Module in Node.js? |
|
Answer» A reusable block of code which may not impact the other codes through its presence is called a Module. Modules are presented in ES6. Modules are significant for MAINTAINABILITY, Reusability, and Namespacing of Code. Module in Node.js is a basic or complex functionality organized in single or VARIOUS JavaScript documents which can be reused all through the Node.js applications. Every module in Node.js has its own unique circumstances, so it can't meddle with different modules or contaminate global modules. Additionally, every module can be put in a different .js record under a different envelope. Node.js actualizes CommonJS modules standard. CommonJS is a gathering of volunteers who characterize JavaScript guidelines for WEB server, work area, and REASSURE application. Node.js includes three types of modules:
|
|