Put in order · JavaScript and TypeScript course · Module 12: Functional Programming
Memoize Syntax with Closure
Arrange the elements of a memoize implementation with closure:
Items to put in order
- return (...args)
- => cache[args]
- = {};
- ||= fn(...args); }
- const memoize
- { const cache
- = (fn) =>
You can check the correct answer by solving this task in the CodeWorlds game.