<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script>
({toString:b} = 123);
console.log(b === Number.prototype.toString); // true
console.log(Number.prototype.toString()); // 0
console.log(b()); // Number.prototype.toString is not generic
let num = 456;
console.log(num.b()); // num.b is not a function
</script>
</body>
</html>
为什么b不能作为函数调用?
守着一只汪
相关分类