You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//es6
function Person(name){
if(typeOf new.target !== undefined){
this.name = name
}else{
throw new Error('you must use new with Person')
}
}
var person = new Person(lai);
var notPerson = Person.call(person, 'lai'); //报错
承接上面一篇
块级函数
箭头函数
尾调用优化
The text was updated successfully, but these errors were encountered: