nativeIntPop.js 622 B

123456789101112131415161718192021222324
  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 = [0];
  6. a[1] = 1
  7. a[2] = 2;
  8. Array.prototype[3] = 3; // Should BailOut on popping this element.
  9. a[6] = 4;
  10. function test1()
  11. {
  12. return a.pop();
  13. }
  14. var len = a.length;
  15. for(i=0; i <= len; i++)
  16. {
  17. WScript.Echo(test1());
  18. }