JavaScript – console.assert() Method
The console.assert() method writes a message to the console if an expression evaluates to false.
The console.assert() method writes a message to the console if an expression evaluates to false.
The console.clear() method clears the console, and depending on the browser, may write “Console was cleared” in the console.
The console.count() method counts the number of times console.count() is called and writes the number to the console.
The console.error() method writes an error message to the console, which can be useful for testing purposes.
The console.group() method starts a message group, and all new messages will be written inside this group.
The console.groupCollapsed() method starts a collapsed message group (which can be expanded), and all new messages will be inside this group.
The console.groupEnd() method ends a console message group created with the console.group() method.
The console.info() method writes a message to the browser console.
The console.log() method logs a message to the browser console, which is useful for testing purposes.
The console.trace() method displays a trace that shows how the code ended up at a certain point.
The console.time() method starts a timer in the console to time code for testing purposes.
The console.timeEnd() method ends a timer in the console that was started with theĀ console.time() method.