Exam4Training

Which global variable can be used in the script?

A developer is setting up a Node,js server and is creating a script at the root of the source code, index,js, that will start the server when executed. The developer declares a variable that needs the folder location that the code executes from.

Which global variable can be used in the script?
A . window.location
B. _filename
C. _dirname
D. this.path

Answer: B

Exit mobile version