I am trying to create simple Chrome console wrapper:
function debug() {
console.log(debug.arguments);
}
But it produces slightly different result from native console:
console.log("log",1,2,3); //outputs: log 1 2 3
debug("log",1,2,3); //outputs: ["log", 1, 2, 3]
Any idea how to make it behave exactly the same?
This should work: