JavaScript · Middle · Question 16 of 75

What is memoization?

Explanation

A memoized function keeps an "arguments → result" Map in a closure. It works for pure functions. Downsides are memory growth and the difficulty of keys for objects (WeakMap is often used).

Further reading

Problem with a question

JavaScript · Middle · question 16

Test yourself

Take the JavaScript · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz