When using the native addEventListener function, you may often want to pass arguments to the callback function. Anonymous functions are here to help.
Things can be tricky when you want to use a function (with required parameters) as an argument within another function.
It may seem like jQuery has been dead for years, but it is still widely used in 2022. But should you take the time to learn it?
To help the developers build robust and high-quality web apps, Angular offers plenty of useful tools.
Add a component that dynamically swaps between next/link and a native anchor tag, and decides how to write the target attribute, all based on the href property.
A (limited) CSS-only approach for styling placeholders, along with a way to work around the limitations with a custom JS-based solution.
Exit clauses can help you write less code and make your code more readable. Here is a simple example, along with some additional tips.
Dynamic property maps are a super powerful paradigm in JavaScript, but they can be tricky to type correctly with TypeScript.
An everyday JavaScript pattern to avoid clunky switch-case statements and unnecessary if conditionals.
Automatically run scripts with NPM/Yarn before or after another script.