We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a5523ad + 18534d3 commit ebd0d11Copy full SHA for ebd0d11
1 file changed
1-js/06-advanced-functions/09-call-apply-decorators/article.md
@@ -36,11 +36,11 @@ function cachingDecorator(func) {
36
37
slow = cachingDecorator(slow);
38
39
-alert( slow(1) ); // slow(1) is cached
40
-alert( "Again: " + slow(1) ); // the same
+alert( slow(1) ); // slow(1) is cached and the result returned
+alert( "Again: " + slow(1) ); // slow(1) result returned from cache
41
42
-alert( slow(2) ); // slow(2) is cached
43
-alert( "Again: " + slow(2) ); // the same as the previous line
+alert( slow(2) ); // slow(2) is cached and the result returned
+alert( "Again: " + slow(2) ); // slow(2) result returned from cache
44
```
45
46
In the code above `cachingDecorator` is a *decorator*: a special function that takes another function and alters its behavior.
0 commit comments