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(); }
This commit is contained in:
parent
c4d1987ebc
commit
6292469b88
1 changed files with 1 additions and 1 deletions
|
@ -280,7 +280,7 @@ alert( worker.slow(3, 5) ); // works
|
|||
alert( "Again " + worker.slow(3, 5) ); // same (cached)
|
||||
```
|
||||
|
||||
Now it works with any number of arguments.
|
||||
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).
|
||||
|
||||
There are two changes:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue