Exports

calender iconUpdated on July 28, 2023
economics
economy

Table of Contentstable of content icon

exports is a special keyword in JavaScript that is used to define a module’s exports. It is a read-only object that contains the properties that are exposed by the module to the global scope.

Syntax:

exports = { // Properties: prop1: value1, prop2: value2, ...};

Example:

exports = { name: 'John Doe', age: 30, sayHello: function() { console.log('Hello, ' + this.name); }};

In this example:

  • exports is an object that has three properties: name, age, and sayHello.
  • The name property has a value of John Doe.
  • The age property has a value of 30.
  • The sayHello property is a function that prints “Hello, ” followed by the value of the name property to the console.

To use the exports object:

“`const exports = require(‘./module’);

console.log(exports.name); // Output: John Doeconsole.log(exports.sayHello()); // Output: Hello, John Doe“`

Note:

  • The exports object is read-only, meaning you cannot modify its properties directly.
  • You can add new properties to the exports object by assigning them to the object.
  • You can remove properties from the exports object by deleting them from the object.

Additional Information:

  • The exports object is used in modules to define the exports that are available to other modules.
  • Modules are loaded using the require() function, and the exports object is accessible through the require() object.
  • The exports object is a common way to share data between modules.

Categories

Pocketful Fintech Capital Private Limited (CIN U65999DL2021PTC390548):

The SEBI Registration No. allotted to us is INZ000313732.
NSE Member Code: 90326| BSE Member Code: 6808| MCX Member Code: 57120
DP CDSL: 12099800

Compliance Officer : Mr. Randhir Kumar Chaudhari
Tel no: 011- 49022222 / 011-49022277
Email: randhir@pocketful.in

Registered Address/Correspondence Address: C- 3, Ground Floor, Okhla Industrial Area, Phase - 1, New Delhi - 110020

For any complaints, drop us an email atlegal@pocketful.in

Procedure to file a complaint on SEBI SCORES: Register on SCORES portal. Mandatory details for filing complaints on SCORES: Name, PAN, Address, Mobile Number, E-mail ID.

Smart Online Dispute Resolution|Link To Circular|Procedures and Policies|Broker Investor Charter|DP Investor Charter

Benefits: Effective Communication, Speedy redressal of the grievances.

Benefits: Effective Communication, Speedy redressal of the grievances.

Please ensure you carefully read the Risk Disclosure Document as prescribed by SEBI and our Terms of Use and Privacy Policy.
The brand name Pocketful and logo is in process of trademarks registration. The cost-effective brokerage plans make Pocketful a trustworthy and reliable online stock broker. Available on both the web and mobile, it offers unmatched convenience to traders. If you are considering opening......

Read More