//using Node.js
//npm i @types/node
const fs = require("fs");
let path = './data';
//Asynchronously:
fs.mkdir(path, (err) => {
if (err)
console.log("Error:", err);
else
console.log('successfully created!');
});
//Synchronously:
if (!fs.existsSync(path)){
fs.mkdirSync(path);
}