Memoization in JavaScript

Nicky Christensen
4 min readJan 27, 2023

Memoization is an optimization technique that stores the results of expensive function calls and returns the cached result when the same inputs occur again.

In other words, memoization is a way to speed up a function by storing its previously computed results and returning them instead of recomputing the result whenever the function is called with the same arguments.

--

--

Nicky Christensen

FE Lead at Rig.dev - A danish guy who speaks about frontend, tech & leadership - Follow & connect @ https://www.linkedin.com/in/dknickychristensen/