DEV Community

Discussion on: Javascript: 5 cool things you can do with console that aren't console.log

Collapse
 
neomonst profile image
NeoMonst

When I was debugging others' code, I really hope there is some kind of console.exit(), so no more following output to mess up with me.

Collapse
 
catmcgeecode profile image
Cat McGee

Do you mean something like console.clear()?

Collapse
 
neomonst profile image
NeoMonst

console.clear();
console.log(myStaff);
console.noMore();

Something like noMore(), because you can imagine, several console.log() could happen after my part.

Thread Thread
 
catmcgeecode profile image
Cat McGee

Ah I get you! console.group() could help you here - you could group all the ones that you like and ignore the others

Thread Thread
 
neomonst profile image
NeoMonst

Wow, I tried console.group(). Yummy!
I guess I will put a console.group() after my code from now on.
Thanks for the tip!