乐趣区

My Javascript Snippets

对象排序
function sortObject(obj, sort) {
const result = {};
Object.keys(obj)
.sort(sort)
.forEach(key => {
result[key] = obj[key];
});
return result;
}

退出移动版