es5array_objproto_builtin.js 659 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 ary = Array(1);
  6. ary.prop = "pass";
  7. Object.prototype.prop = "Got object prototype : Failed";
  8. Array.prototype.prop = "Got array prototype. Failed";
  9. Object.defineProperty(Object.prototype, 0, {
  10. get: function () {
  11. print(this.prop);
  12. return 3;
  13. }
  14. });
  15. ary.slice();