diff --git a/08_Day/08_day_objects.md b/08_Day/08_day_objects.md index 1c767ed..06c2614 100644 --- a/08_Day/08_day_objects.md +++ b/08_Day/08_day_objects.md @@ -110,10 +110,10 @@ function letsLearnScope() { let a = 'Python' let b = 20 let d = 40 - console.log(a, b, c) // Python 20 30 + console.log(a, b, c, d) // Python 20 30 40 } - // we can not access c because c's scope is only the if block - console.log(a, b) + // we can not access d because d's scope is only the if block. c is still in scope + console.log(a, b, c) // JavaScript 10 30 } letsLearnScope() console.log(a, b) // JavaScript 10, accessible