You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create an empty cache by instantiating a new Map object.
5
+
2. Return a function which takes a single argument to be supplied to the memoized function by first checking if the function's output for that specific input value is already cached, or store and return it if not.
6
+
3. The function keyword must be used in order to allow the memoized function to have its this context changed if necessary.
7
+
4. Allow access to the cache by setting it as a property on the returned function.
0 commit comments