From 9ef2930d3065c23c8efec06eb5379cec1069a0cd Mon Sep 17 00:00:00 2001 From: Rahul Reddy Date: Thu, 9 Sep 2021 18:12:33 +0530 Subject: [PATCH] Update Day_08_Objects.md variable c scope is wrongly mentioned. As it is in the same scope we can still access it. So now variable c is placed inside if block justifies the comment. --- 08_Day_Objects/08_day_objects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/08_Day_Objects/08_day_objects.md b/08_Day_Objects/08_day_objects.md index de91f2f..bd8f76a 100644 --- a/08_Day_Objects/08_day_objects.md +++ b/08_Day_Objects/08_day_objects.md @@ -102,12 +102,12 @@ let a = 'JavaScript' // is a global scope it will be found anywhere in this file let b = 10 // is a global scope it will be found anywhere in this file function letsLearnScope() { console.log(a, b) // JavaScript 10, accessible - let c = 30 if (true) { // we can access from the function and outside the function but // variables declared inside the if will not be accessed outside the if block let a = 'Python' let b = 20 + let c = 30 let d = 40 console.log(a, b, c) // Python 20 30 }