var args = Array.prototype.slice.call(arguments); console.log.apply(null, args);
发现报错:
TypeError: Illegal invocation
This is expected because console.info expects its "this" reference to be console, not window.
原因就是console的this对象不能更換,把上面的null改为console就可以了。