Loading

Quipoin Menu

Learn • Practice • Grow

node-js / Global Objects
mcq
Direction: Choose the correct option

Q1.

Which of the following is a global object in Node.js?
A. window
B. global
C. console
D. document
Direction: Choose the correct option

Q2.

What does `global.setTimeout()` do in Node.js?
A. Creates a timeout error
B. Executes a function after a specified delay
C. Sets a timer for a server
D. Defines a global variable
Direction: Choose the correct option

Q3.

Which global object is used for logging and debugging?
A. print
B. debug
C. console
D. log
Direction: Choose the correct option

Q4.

What is the purpose of `__dirname` in Node.js?
A. The root directory of the project
B. The name of the current directory
C. The current file's directory path
D. The directory of the node executable
Direction: Choose the correct option

Q5.

Which global object provides information about the current Node.js process?
A. env
B. os
C. process
D. system