Loading

Quipoin Menu

Learn • Practice • Grow

Direction: Choose the correct option

Q1.

Which core module is used to handle and manipulate file paths?
A. fs
B. os
C. path
D. url
Direction: Choose the correct option

Q2.

What does `path.join()` do?
A. Creates a new directory
B. Checks if a path exists
C. Splits a path into an array
D. Joins multiple path segments into a single path
Direction: Choose the correct option

Q3.

What is the output of `path.extname('index.html')`?
A. html
B. .html
C. index.html
D. .txt
Direction: Choose the correct option

Q4.

Which method returns the last portion of a path?
A. path.filename()
B. path.last()
C. path.name()
D. path.basename()
Direction: Choose the correct option

Q5.

What does `path.parse()` return?
A. A boolean
B. A string
C. An object with path components
D. An array