diff --git a/page/javascript-101/scope.md b/page/javascript-101/scope.md index a7963964..7f4c23c8 100644 --- a/page/javascript-101/scope.md +++ b/page/javascript-101/scope.md @@ -29,6 +29,8 @@ function myFunc() { var x = 5; } +myFunc(); + console.log( x ); // ReferenceError: x is not defined ``` @@ -43,6 +45,8 @@ function myFunc() { x = 5; } +myFunc(); + console.log( x ); // 5 ```