From 664877a60149dbeb5065f5487d7ffcefc0158850 Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Thu, 1 Dec 2016 09:11:00 -0800 Subject: [PATCH] Avoid i++ in array spreads example This style guide recommends using `i += 1` over `i++`. Even though this appears in a "bad" example, the example will be clearest if it is "bad" in fewer ways. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c3db4c0..04ef1903 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,7 @@ Other Style Guides const itemsCopy = []; let i; - for (i = 0; i < len; i++) { + for (i = 0; i < len; i += 1) { itemsCopy[i] = items[i]; } @@ -565,7 +565,7 @@ Other Style Guides // good const foo = '\'this\' is "quoted"'; - const foo = `my name is '${name}'`; + const foo = `my name is '${name}'`; ``` **[⬆ back to top](#table-of-contents)**