Explorar o código

修改代码错误

usuiforhe %!s(int64=2) %!d(string=hai) anos
pai
achega
18b9a8923b
Modificáronse 1 ficheiros con 2 adicións e 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(){