var obj2 = {name: "zhangsan", age: 8, sex: "女", bum: 5}
var objName = Object.keys(obj2).sort()/*获取属性名字,返回一个数组,sort()按字母先后排序,,reverse()进行倒序*/
var newOb={}/*定义一个新的对象*/
for(let item in objName) {
newOb[objName[item]] = obj2[objName[item]]
}