Skip to content

Commit 3d475af

Browse files
authored
Fix a typo
1 parent bf89592 commit 3d475af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ console.log(muatatedArray) //['a','b','d','e']
120120

121121
//Non-mutating way
122122
const nonMuatatedArray = ['a','b','c','d','e'];
123-
const newArray = nonMuatatedArray.filter((item'index) => !( index === 2 ));
123+
const newArray = nonMuatatedArray.filter((item, index) => !( index === 2 ));
124124
console.log(newArray) //['a','b','d','e']
125125
```
126126

@@ -146,7 +146,7 @@ myArray.flat(infinity) // [2, 3, 4, 5 ,7,7, 8, 9, 1, 1];
146146
const numbers = [1,1,3,2,5,3,4,7,7,7,8];
147147

148148
//Ex1
149-
const unieqNumbers = numbers.filter((v,i,a) => a.indexOf(v )=== i )
149+
const unieqNumbers = numbers.filter((v,i,a) => a.indexOf(v) === i)
150150
console.log(unieqNumbers) //[1,3,2,5,4,7,8]
151151

152152
//Ex2

0 commit comments

Comments
 (0)