From 8c7e6f0839f35e4d1c6daef35a63b19bbad127cb Mon Sep 17 00:00:00 2001 From: ethrea1 <7anshuai@gmail.com> Date: Mon, 2 Dec 2013 18:50:06 +0800 Subject: [PATCH] remove a wrong word The `foo` variable is a local variable in the code. if the variable is a global variable, that function `myFn` can see changes to the variable value too, so i removed the word 'global'. --- page/javascript-101/scope.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/javascript-101/scope.md b/page/javascript-101/scope.md index e1069e76..0d835f43 100644 --- a/page/javascript-101/scope.md +++ b/page/javascript-101/scope.md @@ -121,7 +121,7 @@ sayHello(); // "hello" console.log( foo ); // "world" ``` -When you reference a global variable within a function, that function can see changes to the variable value after the function is defined. +When you reference a variable within a function, that function can see changes to the variable value after the function is defined. ``` var myFunction = function() {