NEW
Font size
WorksheetsNodejs Core Modules
Total questions: 15
Worksheet time: 8mins
A path is a specific way to locate ___ or ___ within the system hierarchy
extension or directory
file or directory
file or extension
directory or folder
______ provides the complete location of a file or directory starting from the root of the file system
absolute path
relative path
home path
root path
_____ specifies the location of a file or directory relative to the current working directory
absolute path
relative path
home path
root path
Choose the correct option for root in file systems
Linux/macOs === "\"
Windows === "/"
Linux/macOs === "C:/"
Windows === "/"
Linux/macOs === "/"
Windows === "C:\"
Linux/macOs === "/"
Windows === "\"
The root of a file system is _____
The highest-level directory in the directory hierarchy
The lowest-level directory in the directory hierarchy
The entry-level directory in the directory hierarchy
The current-level directory in the directory hierarchy
Which of these modules allow NodeJs applications interact with and gather information about the underlying operating system on which the Node.js runtime is running?
path
process
fs
os
Which of these modules is responsible for providing a way to interact with the current NodeJs process running the application.
os
fs
path
process
To get the environment variables running in a process, which of the following is correct:
process.vars
process.env
process.environs
process.envars
'node app.js name daniel'
What would be the output of process.argv[2]
node
app.js
name
daniel
One of the following exits a running Nodejs process?
process.quit()
process.close()
process.exit()
process.stop()
What is the full meaning of fs
file system
file sync
folder setup
folder settings
One of the following is NOT possible with the fs module
create, read and update file or directory
open file or directory
sync file or directory
delete file or directory
Most, if not all functions in the fs module have asynchronous and synchronous methods
True
False
I don't know
none of the options
Which of the following methods will read the content of a file asynchronously
fs.read()
fs.readFile()
fs.readFileAsync()
fs.readfile()
Using the http module, what is the correct method for creating a server
http.server()
http.startServer()
http.createServer()
http.listen()
