rutingjin
rutingjin
```js Object.toString === Object.__proto__.toString // true Object.__proto__.toString === Function.prototype.toString // true Object.toString === Function.prototype.toString // true Function.prototype.toString.call('') // Uncaught TypeError: Function.prototype.toString requires that 'this' be a Function Function.prototype.toString.call(function () {...
#### 判断是否为window ```js function isWindow( obj ) { return obj != null && obj === obj.window; } let fakeWindow = {} fakeWindow.window = fakeWindow isWindow(fakeWindow) // true ``` #### 为什么不用这种方法,是存在什么缺陷吗?...