From cb47b478c70bb0d1bee0a60643c5970bd67a799a Mon Sep 17 00:00:00 2001 From: Josh Perez Date: Mon, 27 Apr 2015 16:58:09 -0700 Subject: [PATCH] Amend grammar for default parameters --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b149f357..e63ee400 100644 --- a/README.md +++ b/README.md @@ -551,9 +551,9 @@ } ``` - - Don't put side effect into default parameter + - Avoid side effects with default parameters - > it introduces confusion and subtlety. Arguments in function call are evaluated at call site, but default parameters are not evaluated at define site. + > Why? They are confusing to reason about. ```javascript var b = 1;