• Register

Share:- Whatsapp Facebook Facebook

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


0 votes
What are Globals in Node.js?
in Node.js by

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.
by (4.4k 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)
by (4.4k points)