From ef625c80c65bc1d0b90a5b74ac184f62a2d0abeb Mon Sep 17 00:00:00 2001 From: Shashank Goyal Date: Mon, 25 Feb 2019 02:46:13 +0000 Subject: [PATCH] Fix output of sample code (#28971) sample code to avoid using shared or mutable state has output commented as 2 while it should be 1. --- guide/english/design-patterns/functional-programming/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/english/design-patterns/functional-programming/index.md b/guide/english/design-patterns/functional-programming/index.md index 7b17adf620..cba3cdee39 100644 --- a/guide/english/design-patterns/functional-programming/index.md +++ b/guide/english/design-patterns/functional-programming/index.md @@ -55,7 +55,7 @@ Using parameters creates function-specific scope. function double(number) { return number * 2; } - console.log(count(1)); // 2 + console.log(count(1)); // 1 console.log(double(1)); // 2 ``` Using shared, global variables means that changes might be unpredictable, especially when variables are shared between multiple files.