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