From 6292469b8883e4afaef73489550f1ca3b2cf3041 Mon Sep 17 00:00:00 2001 From: paroche <46547072+paroche@users.noreply.github.com> Date: Sun, 1 Sep 2019 19:14:59 -0600 Subject: [PATCH] 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-js/06-advanced-functions/09-call-apply-decorators/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/09-call-apply-decorators/article.md b/1-js/06-advanced-functions/09-call-apply-decorators/article.md index 3ca987c4..9fa8b418 100644 --- a/1-js/06-advanced-functions/09-call-apply-decorators/article.md +++ b/1-js/06-advanced-functions/09-call-apply-decorators/article.md @@ -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: