eplace the usage of ìndexOf for includes`

This commit is contained in:
Danny Feliz
2017-12-11 21:32:47 -04:00
committed by GitHub
parent d0b6531c45
commit e28bd9a95f

View File

@ -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;
}, []);