arrlit_asg_escape.js 565 B

1234567891011121314151617
  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 arr;
  6. function test(param)
  7. {
  8. var x;
  9. arr = [ 1, (x = function() { return param; }), 2];
  10. }
  11. test("test1");
  12. WScript.Echo(arr[1]());
  13. test("test2");
  14. WScript.Echo(arr[1]());