What's the difference between FireBug's conole.log() and console.debug() ?
Posted
by 6bytes
on Stack Overflow
See other posts from Stack Overflow
or by 6bytes
Published on 2010-06-16T12:36:44Z
Indexed on
2010/06/16
13:22 UTC
Read the original article
Hit count: 136
A very simple code to illustrate the difference.
var x = [0, 3, 1, 2];
console.debug('debug', x);
console.log('log', x);
// above display the same result
x.splice(1, 2);
// below display kind of a different result
console.debug('debug', x);
console.log('log', x);
The javascript value is exactly the same but console.log() displays it a bit differently than before applying splice()
method. Because of this I lost quite a few hours as I thought splice is acting funny making my array multidimensional or something.
I just want to know why does this work like that. Does anyone know? :)
© Stack Overflow or respective owner