var s={a:1};Object.defineProperty(s,"a",{value:2});s.a;//2Object.getOwnPropertyDescriptor(s,"a");//configurable: true enumerable: true value: 2 writable: true用var s={a:1};定義一個屬性的值,屬性的標(biāo)簽?zāi)J(rèn)為true,但是用Object.defineProperty(s,"a",{value:2});定義一個屬性的值,屬性的標(biāo)簽在沒有寫的情況下應(yīng)該是默認(rèn)為false,按照以上順序?qū)懙拇a,屬性的三個標(biāo)簽值應(yīng)該被覆蓋成fasle才對,為什么最后還會輸出configurable: true enumerable: true ?writable: true呢
關(guān)于configurable 、enumerable 、 writable 疑問
慕姐8259394
2017-09-12 23:03:30