15.2.3.6-4-187.js (634B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 es5id: 15.2.3.6-4-187 6 description: > 7 Object.defineProperty - 'O' is an Array, 'name' is an array index 8 named property, test TypeError is not thrown if the [[Writable]] 9 attribute of the length property in 'O' is false and value of 10 'name' is less than value of the length property (15.4.5.1 step 11 4.b) 12 ---*/ 13 14 var arrObj = [1, 2, 3]; 15 16 Object.defineProperty(arrObj, "length", { 17 writable: false 18 }); 19 20 Object.defineProperty(arrObj, 1, { 21 value: "abc" 22 }); 23 24 reportCompare(0, 0);