eval_escape.js 581 B

12345678910111213141516171819
  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 escape;
  6. function test(param)
  7. {
  8. var nested = function() { return param; }
  9. eval("escape = nested");
  10. }
  11. test("test1");
  12. WScript.Echo(escape());
  13. test("test2");
  14. WScript.Echo(escape());