Skip to content

Node JS Extra

Sandesh Kota edited this page Feb 6, 2021 · 8 revisions
  • When you create a file in Node.Js, node actually wraps the content and puts it inside a function
    • example, if you create the below file
          // index.js
          console.log('Hello');
      
      • node wraps it as below
          // index.js
          function(exports, module, require, __filename, __dirname) {
              console.log('Hello');
              return module.exports;
          }
      

Clone this wiki locally