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);
}
}
Function.prototype.apply should do the job:
function debug() {
if (settings.debug) {
console.log.apply(this, arguments);
}
}