From d540e06cd5916dd720ae9edda6117c160996c23f Mon Sep 17 00:00:00 2001 From: DensonAbraham Date: Fri, 2 Oct 2020 10:52:47 +0530 Subject: [PATCH] Fixed type errors in Day 9 and Day 11 md files --- .../09_day_higher_order_functions.md | 6 +++--- .../11_day_destructuring_and_spreading.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/09_Day_Higher_order_functions/09_day_higher_order_functions.md b/09_Day_Higher_order_functions/09_day_higher_order_functions.md index 3c8a619..a7b7171 100644 --- a/09_Day_Higher_order_functions/09_day_higher_order_functions.md +++ b/09_Day_Higher_order_functions/09_day_higher_order_functions.md @@ -196,7 +196,7 @@ arr.forEach((element, index, arr) => console.log(index, element, arr)) ```js let sum = 0; const numbers = [1,2,3,4,5]; -numbers.forEach(num => console.log(num))) +numbers.forEach(num => console.log(num)) console.log(sum) ``` @@ -212,7 +212,7 @@ console.log(sum) ```js let sum = 0; const numbers = [1,2,3,4,5]; -numbers.forEach(num => sum += num)) +numbers.forEach(num => sum += num) console.log(sum) ``` @@ -391,7 +391,7 @@ _every_: Check if all the elements are similar in one aspect. It returns boolean ```js const names = ['Asabeneh', 'Mathias', 'Elias', 'Brook'] -const areAllStr = names.every((name) => typeof name === 'string') +const arrAllStr = names.every((name) => typeof name === 'string') console.log(arrAllStr) ``` diff --git a/11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md b/11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md index 5f0e896..4e503ad 100644 --- a/11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md +++ b/11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md @@ -57,7 +57,7 @@ Destructuring is a way to unpack arrays, and objects and assigning to a distinct ```js const names = ['Asabeneh', 'Brook', 'David', 'John'] - let [firstPerson, secondPerson, thirdPerson, fourth Person] = names + let [firstPerson, secondPerson, thirdPerson, fourthPerson] = names console.log(firstName, secondPerson,thirdPerson, fourthPerson) ```