How Do You Create, List and Delete Folders in Node.js?
Create, list and delete folders in Node.js using mkdir, readdir and rm with recursive options, Dirent types and a safe directory walker.
453 posts about JavaScript: questions with answers, tutorials and articles, newest first.
Create, list and delete folders in Node.js using mkdir, readdir and rm with recursive options, Dirent types and a safe directory walker.
Learn to call APIs with fetch and async await: read JSON, send POST data, check status codes, handle errors and timeouts, and render the result.
startsWith() and endsWith() return a boolean for the beginning or end of a string. See the position argument, case rules and practical examples.
Build a React counter app from an empty Vite project, adding buttons, handlers, a step size and limits one step at a time.
Use fs promises in Node.js with async and await for reading, writing and copying files, run work in parallel and close file handles correctly.
Promises and async await let JavaScript handle slow work without callback pyramids. Learn states, chaining, error handling and running tasks in parallel.
Use includes() for a true or false answer and indexOf() for the position of a substring, plus case-insensitive and regular expression options.
Learn the useState hook syntax, lazy initial state, the rules of hooks and the mistakes beginners make when updating state.
Understand how Sync, callback and promise fs methods differ in Node.js, why blocking hurts servers, and when sync calls are acceptable.
Learn how events travel through the page and how to use addEventListener, event delegation and listener options to build responsive, efficient interfaces.
Read a JavaScript string length with the length property and access characters with brackets, at() and charAt(), including emoji and Unicode pitfalls.
State is the data a component remembers between renders. Learn why plain variables are not enough and how state differs from props.
Write, overwrite and append to files in Node.js with writeFile and appendFile, choose the right flags and save JSON or large data safely.
The DOM is the browser's live tree of your page. Learn to select elements and change text, classes and structure with JavaScript without security mistakes.
Create JavaScript strings with single quotes, double quotes or template literals, and escape quotes, newlines and Unicode characters with a backslash.
Derive the visible list from search and sort state with filter() and a sorted copy, then render it with map() and stable keys.
Read text, JSON and large files in Node.js using readFile, readFileSync, fs promises and streams, and handle errors like ENOENT correctly.
Understand how JavaScript functions are declared and called, and how scope, closures and let, const and var decide which variables your code can see.
A step by step FizzBuzz JavaScript solution with the modulo operator, the check order pitfall, cleaner variants and how to explain it in an interview.
The React key prop lets React match list items between renders. Learn what goes wrong with index keys and how to choose stable, unique keys.