arrlit_escape.js 547 B

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