自定义log代理console.log方法

1,116 阅读1分钟

自定义一个log方法打印出该方法的所有参数

function log(){
    console.log.apply(console,arguments);
}