Denis Barushev

Email: barushev@gmail.com

Passing All Arguments from One JavaScript Function to Another

Function.prototype.apply should do the job:

function debug() {
    if (settings.debug) {
        console.log.apply(this, arguments);
    }
}