propertyStrings.js 750 B

12345678910111213141516171819202122232425262728
  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 a = new Array();
  6. function f()
  7. {
  8. var i = new Object();
  9. i
  10. Object.defineProperty(i, "Pass", {value: 1, writable:false, enumerable: true} );
  11. for (var attr in i)
  12. {
  13. a.push(attr);
  14. }
  15. for (var attr in Array)
  16. {}
  17. }
  18. f();
  19. CollectGarbage();
  20. for (var index = 0; index < a.length; index++)
  21. {
  22. WScript.Echo(a[index]);
  23. }