If you have
function log() {
console.log.apply(console, arguments);
}
and call it like log('foo');
then that translates to console.log.apply(console, ['foo']);
which is equivalent to console.log('foo');
which is what you want.
If you defined it like
function log() {
console.log(arguments);
}
instead then log('foo');
would be equivalent to log(['foo']);
which is not what you want.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…