js Gets an object attribute names (reprint)

Source: https: //www.cnblogs.com/YuyuanNo1/p/9257634.html

dataObj = {
name : su,
age : 26,
height : 18cm
};
for(var st in dataObj) {
console.dir(st);
}


/////////////打印
name
age
height

Guess you like

Origin www.cnblogs.com/hao-1234-1234/p/11627680.html