I’ve always believed learning as many details as possible about as many features of a tool as possible allows maximum usage of that tool. We all know console.log but how well do we know the step-children of the Console object?
1. Console.assert( )
logs a message when a set condition equals false
2. Console.count( )
logs the # of times count( ) and the same label were called
3. Console.dir( )
logs a JS key/value pair view of an argument
4. Console.error( )
logs a message styled like an error with a stack trace and red x icon
5. Console.group( ) and Console.groupEnd( )
console.group() STARTS a group for messages logged after this method. console.groupEnd() CLOSES the group
6. Console.groupCollapsed( )
collpases the group by default
7. Console.time( ) and Console.timeEnd( )
Console.time( yourLabel ) starts the timer. Console.timeEnd( yourLabel ) shows the time passed
8. Console.trace( )
logs a trace from where the method was called. lolo( ) is on line:1 but First time is on line:3–2nd time is on line:5
9. Console.warn()
logs a message that is styled like a warning with a caution icon to the left
Self taught VBA Coder, Opspark Bootcamp taught Javascript Coder, Creative, innovative imaginator, born to discover my damn self thru my damn self and others.