标签:ror asc row highlight new var this else name
var person = {
usename : "wade",
_age : "18",
get age (){
return this._age;
},
set age(val){
if(val < 0 || val > 100){
throw new Error("年龄不合实际");
}else{
return this._age;
}
}
};
console.log(person.age);
标签:ror asc row highlight new var this else name
原文地址:http://www.cnblogs.com/tongxuping/p/6034443.html