getOwnPropertyNames (obj); // ['firstName', 'lastName', 'greeting'] Copy. 该方法同样适用于数组,值得注意的是该方法会返回一个 length 属性。
確定! 回上一頁