How to remove duplicates from an array in JavaScript
Sets and filter make duplicate removal simple, but there are trade offs. Compare the shortcut with a hand written solution and see how each behaves.
Sets and filter make duplicate removal simple, but there are trade offs. Compare the shortcut with a hand written solution and see how each behaves.
Node.js runs on one thread but worker threads change the story. Learn how to move work off the main thread, share memory and build channels.
Copying objects in JavaScript has more depth than it looks. Compare shallow copy, deep copy, assign and merge, with the bugs each approach can hide.
A small scraping script can remove hours of repetitive work. Follow the scraper that collected article data, handled infinite scroll and exported the result.
Nodemon restarts your server when files change. Rebuild the core idea from scratch with fs.watch, child processes and a small command line interface.
A logger is more than console.log. Build one from scratch with levels, transports, formatting and file output, then test each piece.
Firing every async task at once can exhaust your process. Limit concurrency with a small queue so heavy work is spread out over time.
Generators can pause functions in the middle of their work. Use that power to implement async and await, one yield at a time.
Promises look simple from the outside. Rebuild the core from scratch and implement then, handlers, state transitions and chaining.