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:
paroche 2019-09-01 19:14:59 -06:00 committed by GitHub
parent c4d1987ebc
commit 6292469b88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: