#fundamentals

Optimize like a pro: Memoization in Javascript

Memoization is a caching technique that consists in saving the result of an expensive function and returning it if the same inputs are provided again. In short, it’s like having a “no smoking” sign inside a restaurant instead of going to each customer and asking them not to light their cigarettes.