q.js 847 B

123456789101112131415161718192021222324252627282930313233343536
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. WScript.LoadScriptFile("../UnitTestFramework/known_globals.js");
  6. let x;
  7. WScript.Echo(x);
  8. {
  9. let x = 5;
  10. WScript.Echo(x);
  11. }
  12. WScript.Echo(x);
  13. for (var a in this) {
  14. if (isKnownGlobal(a))
  15. continue;
  16. WScript.Echo(a);
  17. }
  18. WScript.Echo();
  19. function f() {
  20. const x = 'a';
  21. WScript.Echo(x);
  22. if (1 > 0)
  23. {
  24. let x;
  25. WScript.Echo(x);
  26. }
  27. WScript.Echo(x);
  28. WScript.Echo(f);
  29. }f();
  30. WScript.Echo(x);