Function.prototype.myApply=function(context){if(typeofthis!=='function'){thrownewTypeError('Error')}
context = context || window
context.fn =thislet result
if(arguments[1]){
result = context.fn(...arguments[1])}else{
result = context.fn()}delete context.fn
return result
}