From e28bd9a95ff0d8b9841ac96b273aea006eaa7684 Mon Sep 17 00:00:00 2001 From: Danny Feliz Date: Mon, 11 Dec 2017 21:32:47 -0400 Subject: [PATCH] =?UTF-8?q?eplace=20the=20usage=20of=20=C3=ACndexOf`=20for?= =?UTF-8?q?=20`includes`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb2e006d0..4a3214633 100644 --- a/README.md +++ b/README.md @@ -364,7 +364,7 @@ Check if each value has already been added, using `includes()` on the accumulato ```js var uniqueValues = arr => arr.reduce( (acc, val) => { - if(acc.indexOf(val)) + if(!acc.includes(val)) acc.push(val); return acc; }, []);