In JavaScript documentation:The loop will iterate over all enumerable properties of the object itself and those the object inherits from its constructor's prototype (properties closer to the object in the prototype chain override prototypes' properties).
譯文: 循環將遍歷對象自己的全部可枚舉屬性以及對象從其構造函數的原型繼承的屬性(更靠近原型鏈中對象的屬性覆蓋原型的屬性)。 所以,你可能得到對象原型上你不想要的屬性。ide