Android-Web-Inspector icon indicating copy to clipboard operation
Android-Web-Inspector copied to clipboard

Console log does not accept rest params!

Open senseijames opened this issue 6 years ago • 1 comments

If you have something like this:

console.log('one', 'two', 'three');

you will only see

one

logged to the console. You'll need to manually wrap the params in an Array and join, like so:

console.log([ 'one', 'two', 'three' ].join(' '));

to see the expected output.

(Note I referenced this on StackOverflow in hopes that it might get some play.)

senseijames avatar Oct 07 '19 03:10 senseijames

original_log = console.log
function foo() { original_log(...arguments) }
console.log = foo

CTimmerman avatar Apr 16 '22 15:04 CTimmerman