Node.js · Junior · Question 56 of 75

How do you create a folder together with any missing parent folders?

Explanation

With recursive: true, mkdir also does not fail if the folder already exists. rm(path, { recursive: true, force: true }) is the matching way to delete a tree.

Further reading

Problem with a question

Node.js · Junior · question 56

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