无法获得unlisted <- as.data.frame(t(apply(df, 1, unlist)))
来电功能|构造函数。
似乎:NodeJS,客户端(Firefox,......)使用ES6避免this
,
这个问题的任何解决方案,已知,
arguments.callee.caller
function setProp(prop,val){
arguments.callee.caller.prototype[prop]=val;
}
function Person(){
setProp('birthday',new Date());
return this;
}
我们尝试将function setProp(prop,val){
arguments.callee.caller.prototype[prop]=val; //--- Throw ERROR
//Another attempt : arguments.callee(true).caller[prop]=val //--- throw Error
}
class Person{
constructor(){
setProp('birthday',new Date())
}
}
转换为箭头功能。但setProp
表示this
,window
未定义