1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 Object.defineProperty(Array.prototype, "0", {
9 get: function() { return "get " + v; },
10 set: function(value) { v += value; }
14 assertEquals(0, array.length);
16 assertEquals("get 10", array[0]);
19 assertEquals(1, array.length);
21 assertEquals("get 110", array[0]);