let_blockescape.js 588 B

1234567891011121314151617181920212223
  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. function test(param)
  6. {
  7. var f;
  8. {
  9. let x = param + "str";
  10. f = function() { return x; }
  11. }
  12. return f();
  13. }
  14. WScript.Echo(test("test1"));
  15. WScript.Echo(test("test2"));