Can I use an arrow function as the callback for an event listener in JavaScript?
Learn the differences between JavaScript ES6 arrow functions and regular functions and how they affect event listener callbacks.
The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
Learn the differences between JavaScript ES6 arrow functions and regular functions and how they affect event listener callbacks.
Learn different ways to memoize function calls in JavaScript as well as when to use memoization to get the best performance results.
Boolean traps can cause readability and maintainability issues in your code. Learn what they are, how to spot and fix them in this article.
Learn how to combine two or more objects into a single object in JavaScript.
Asynchronously looping over arrays in JavaScript comes with a few caveats you should watch out for.
Learn how to use JavaScript ES6 generators and iterators to iterate over ranges of numbers.
Learn everything you need to know about higher-order functions with this short guide and level up your programming skills.
JavaScript's arrow functions are seemingly the same as regular functions, but there are some important differences you need to know.
Currying is a process that transforms a function that takes multiple arguments into a series of functions that each take a single argument.
JavaScript uses callback functions quite a lot. From event listeners to asynchronous code, they're an invaluable tool you need to master.
Closures are used frequently, yet often misunderstood. Understanding them in depth is crucial to be able to write clean, maintainable code.
Function arity is a simple, yet useful concept in functional programming, especially when combined with currying.
Learn everything you need to know about promises and asynchronous JavaScript with this handy cheatsheet.
Chunk an array or iterable into arrays of a specified size or a given number of chunks.
Learn everything you need to know about JavaScript's call()
, apply()
and bind()
in this short guide.
JavaScript arrow functions are a very useful tool to learn and master. Here's a complete introduction to everything you need to know.
JavaScript's Boolean function can be used for truth-checking data among other things. Learn how to use it and level up your code today.
JavaScript callbacks are especially tricky when you're not careful. Take a deeper dive into potential issues and how to avoid them.
Performs left-to-right function composition for asynchronous functions.
JavaScript's promises represent the eventual completion (or failure) of asynchronous operations and their resulting value.
Learn how to resolve promises one after another (sequentially) in JavaScript.
JavaScript's this
keyword can confuse beginners and veterans alike. Learn how it works in different scenarios and start using it correctly.
Easily create a debounced function that returns a promise.
Defers invoking a function until the current call stack has cleared.