diff --git a/01_Day_JavaScript_Refresher/01_javascript_refresher.md b/01_Day_JavaScript_Refresher/01_javascript_refresher.md index 120928c..355e088 100644 --- a/01_Day_JavaScript_Refresher/01_javascript_refresher.md +++ b/01_Day_JavaScript_Refresher/01_javascript_refresher.md @@ -13,8 +13,8 @@ Asabeneh Yetayeh
October, 2020 - + [<< Day 0](../readMe.md) | [Day 2 >>](../02_Day_Introduction_to_React/02_introduction_to_react.md) @@ -2763,13 +2763,12 @@ Let us see were we use call back functions.For instance the _forEach_ method use ```js const numbers = [1, 2, 3, 4] -​ const sumArray = arr => { let sum = 0 const callback = function(element) { sum += element } - numbers.forEach(callback) + arr.forEach(callback) return sum } @@ -2777,7 +2776,7 @@ console.log(sumArray(numbers)) ``` ```sh -15 +10 ``` The above example can be simplified as follows: @@ -2787,7 +2786,7 @@ const numbers = [1, 2, 3, 4] ​ const sumArray = arr => { let sum = 0 - numbers.forEach(function(element) { + arr.forEach(function(element) { sum += element }) return sum @@ -2797,7 +2796,7 @@ console.log(sumArray(numbers)) ``` ```sh -15 +10 ``` #### setting time diff --git a/05_Day_Props/05_props.md b/05_Day_Props/05_props.md index 47d1fd2..9e89287 100644 --- a/05_Day_Props/05_props.md +++ b/05_Day_Props/05_props.md @@ -1082,4 +1082,4 @@ We will cover propTypes in detail in other section. 🎉 CONGRATULATIONS ! 🎉 -[<< Day 4](../04_Day_Component/04_components.md) | [Day 6 >>]() +[<< Day 4](../04_Day_Component/04_components.md) | [ >>](../06_Day_Map_List_Keys/05_map_list_keys.md)