题解 | #Function.bind#
Function.bind
https://www.nowcoder.com/practice/ecad0164931847f78c55278cee56e544
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
</head>
<body>
<script type="text/javascript">
// 补全代码
Function.prototype._bind = function(target, ...arguments1) {
if(typeof this !== "function"){
throw new TypeError("Error")
}
const fn = this
return function Fn(){
return fn.apply(
this instanceof Fn ? this: target,
arguments1
)
}
}
</script>
</body>
</html>

查看21道真题和解析