Correct order

Report a typo

We need to create a memes directory. However, if it already exists, we need to create a directory called memes-2 instead.

Put fragments of code in the correct order to create the necessary directory.

Put the items in the correct order
});
}
mkdir('memes-2', (err) => {
mkdir('memes', (err) => {
const { mkdir } = require('node:fs');
if (err) {
console.log(err);
}
console.log('Created memes directory');
});
if (err) {
___

Create a free account to access the full topic