Console Methods in JavaScript
Console Methods in JavaScript
COM
Burhan Tahir
@iamshekhobaba
This method is used to print general
messages or values to the console.
Burhan Tahir
@iamshekhobaba
This method is used to output
warning messages.
Burhan Tahir
@iamshekhobaba
This method is used to output debugging
messages. It's generally hidden by default
in the console's default view and needs
to be enabled.
Burhan Tahir
@iamshekhobaba
console.group( ) and
console.groupEnd( )
These methods are used to group
console messages together, which can
be expanded or collapsed.
Burhan Tahir
@iamshekhobaba
console.assert( )
This method is used to print a
message if an assertion is false.
console.clear( )
This method is used to clear the
console.
Burhan Tahir
@iamshekhobaba
console.trace( )
This method outputs a stack trace
to the console.
Burhan Tahir
@iamshekhobaba
console.time( ) and
console.timeEnd( )
These methods are used to measure
the time taken for a particular
operation.
Burhan Tahir
@iamshekhobaba
SHEKHOBABA.COM
Burhan Tahir
@iamshekhobaba
SHEKHOBABA.COM