Object.prototype.looper = function() {
var result = [];
for (var property in this)
result.push(property);
return result;
};
var test = {name: "tab", age: 5};
console.log(test.looper());
如何消除尺蠖得到公正的鑰匙對象有額外的屬性,同時從一個對象中提取鍵
["name", "age", "looper", looper: function]
輸出所需
["name", "age"]