From d4c63959be88008a0e2c1ab477f98f2fc3bfc3d9 Mon Sep 17 00:00:00 2001 From: Yash Patel <43649828+Zyash@users.noreply.github.com> Date: Mon, 20 Jun 2022 01:56:20 -0600 Subject: [PATCH] Update 09_day_higher_order_functions.md sum variable was never used in this 'forEach' Callback function that is why it never got updated, which means output should be 1,2,3,4,5,0. However, There is no necessary to use sum variable in it to understand the 'forEach' callback function. I hope it is helpful. Thank You --- 09_Day_Higher_order_functions/09_day_higher_order_functions.md | 2 -- 1 file changed, 2 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 9aa6871..dc4dc16 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 @@ -191,10 +191,8 @@ 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)) -console.log(sum) ``` ```sh