2
0

es5array_crosssite.js 629 B

1234567891011121314151617181920
  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. function SetArrayIndex(a, i)
  6. {
  7. a[i] = "blah";
  8. }
  9. function test_obj_proto(proto)
  10. {
  11. var obj = Object.create(proto);
  12. //var obj = {};
  13. obj[0] = 0;
  14. SetArrayIndex(obj, 0);
  15. SetArrayIndex(obj, 1);
  16. WScript.Echo(obj[1]);
  17. }