Explorar el Código

修改代码错误

usuiforhe hace 2 años
padre
commit
18b9a8923b
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      TS/JaveScript.md

+ 2 - 1
TS/JaveScript.md

@@ -188,7 +188,7 @@ function foo(){
     console.log(message);
 }
 function bar(){
-    message = "Hello Bar";
+    var message = "Hello Bar";
     foo();
 }
 
@@ -213,6 +213,7 @@ bar();      // 输出 Hello Global
 function foo(){
     m = 100;
 }
+foo();
 console.log(m);
 
 function foo1(){