argout_escape.js 580 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. var glo;
  6. function escape(f)
  7. {
  8. glo = f;
  9. }
  10. function test(param)
  11. {
  12. escape(function() { return param; });
  13. }
  14. test("test1");
  15. WScript.Echo(glo());
  16. test("test2");
  17. WScript.Echo(glo());