求助!!!!!在线等急!!!!
var forest={};
Object.defineProperties(forest,{
title:{value:'fe',enumerable:true},
corp:{value:'BABA',enumerable:true},
salary:{value:'50000',enumerable:true,writable:true},
luck:{
get:function(){
return Math.random()>0.5?'good':'bad';
}
},
promote:{
set:function(level){
this.salary*=1+level*0.1;
}
}
});
forest.salary;
这个代码在Sublime怎么执行?
而且会报错
Uncaught TypeError: forest.promote is not a function
at 标签属性.html:37