diff --git a/README.md b/README.md index fa8f753..584820e 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ console.log(muatatedArray) //['a','b','d','e'] //Non-mutating way const nonMuatatedArray = ['a','b','c','d','e']; -const newArray = nonMuatatedArray.filter((item'index) => !( index === 2 )); +const newArray = nonMuatatedArray.filter((item, index) => !( index === 2 )); console.log(newArray) //['a','b','d','e'] ``` @@ -146,7 +146,7 @@ myArray.flat(infinity) // [2, 3, 4, 5 ,7,7, 8, 9, 1, 1]; const numbers = [1,1,3,2,5,3,4,7,7,7,8]; //Ex1 -const unieqNumbers = numbers.filter((v,i,a) => a.indexOf(v )=== i ) +const unieqNumbers = numbers.filter((v,i,a) => a.indexOf(v) === i) console.log(unieqNumbers) //[1,3,2,5,4,7,8] //Ex2