• Register
Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

What are Globals in Node.js

0 votes
18 views
What are Globals in Node.js?
asked Aug 13 in Node.js by Veena Verma

2 Answers

0 votes
There are three keywords in Node.js known as Globals:-

1. Buffer – Buffer is a class in Node.js that handles binary data.
2. Global – Global represents the Global namespace object and acts as a container for all other objects.
3. Process – Process is one of the global objects but can turn a synchronous function into an async callback. It can be accessed from anywhere in code and it gives back information about application or environment.
answered Aug 14 by ranju_12 (1,740 points)
0 votes
There are following list of Node.js global objects:-

  * Console
  * Process
  * Buffer
  * __dirname
  * __filename
  * setImmediate(callback[, arg][, ...])
  * setInterval(callback, delay[, arg][, ...])
  * setTimeout(callback, delay[, arg][, ...])
  * clearImmediate(immediateObject)
  * clearInterval(intervalObject)
  * clearTimeout(timeoutObject)
answered Aug 14 by ranju_12 (1,740 points)
...