From 31265099af89f9694704bbd88267202063a0aae9 Mon Sep 17 00:00:00 2001 From: felipethome Date: Fri, 5 Aug 2016 18:38:35 -0300 Subject: [PATCH] [guide] Simplify the examples of 'apply vs spread' topic --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cc312913..966c263e 100644 --- a/README.md +++ b/README.md @@ -771,12 +771,12 @@ Other Style Guides ```javascript // bad - const x = [[1, 2], [3, 4], [5, 6]]; - console.log(Array.prototype.concat.apply([], x)); + const x = [1, 2, 3, 4, 5]; + console.log.apply(console, x); // good - const x = [[1, 2], [3, 4], [5, 6]]; - console.log([].concat(...x)); + const x = [1, 2, 3, 4, 5]; + console.log(...x); // bad new (Function.prototype.bind.apply(Date, [null, 2016, 08, 05]));