Skip to content

Commit 6292469

Browse files
authored
Update article.md
Qualify that while cachingDecorator() will now work with any number of arguments, the hash() function given will not. Or, perhaps better, could just change the hash function to something like: function hash(args) { return [...args].join(); }
1 parent c4d1987 commit 6292469

File tree

1 file changed

+1
-1
lines changed
  • 1-js/06-advanced-functions/09-call-apply-decorators

1 file changed

+1
-1
lines changed

1-js/06-advanced-functions/09-call-apply-decorators/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ alert( worker.slow(3, 5) ); // works
280280
alert( "Again " + worker.slow(3, 5) ); // same (cached)
281281
```
282282

283-
Now it works with any number of arguments.
283+
Now it works with any number of arguments (though the hash function would need to be adjusted for a different number of arguments than two).
284284

285285
There are two changes:
286286

0 commit comments

Comments
 (0)