Node.js · Junior · Question 44 of 75

What does path.join("/users", "anna", "../docs", "file.txt") return on Linux?

Explanation

path.join joins the segments with the platform separator and normalizes .. and .. It does not check whether the path exists.

Further reading

Problem with a question

Node.js · Junior · question 44

Test yourself

Take the Node.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz